From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-3.9 required=3.0 tests=ALL_TRUSTED,AWL,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 7E4E41F454; Sat, 2 Nov 2019 02:12:39 +0000 (UTC) Date: Sat, 2 Nov 2019 02:12:39 +0000 From: Eric Wong To: Sam Saffron Cc: mwrap-public@80x24.org Subject: Re: extend mwrap dump to include frees/allocations Message-ID: <20191102021239.GA24394@dcvr> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: List-Id: Sam Saffron wrote: > (allocations-frees) * (total_allocated / allocations) is a reasonable > estimate for leak per call site. > > Currently mwrap dump does not include this info, I was thinking we > default sort this down by estimated leak size and included the missing > bits on info into the dump report? Do you mean Mwrap.dump the method or via ENV dump_path: destructor? (or both?). It's been a while since I looked at this code(*) It'd have to only be enabled via an optional flags arg for compatibility with existing code. Sorting the dump output would be expensive for big processes because of the temporary memory required. I think that's best be left for the consumer to do in another thread/process. (*) Fwiw, I've started learning XS and porting it to Perl5, and hoping to maintain feature parity: