mwrap user+dev discussion/patches/pulls/bugs/help
 help / color / Atom feed
From: Eric Wong <e@80x24.org>
To: Sam Saffron <sam.saffron@gmail.com>
Cc: mwrap-public@80x24.org
Subject: Re: extend mwrap dump to include frees/allocations
Date: Sat, 2 Nov 2019 02:12:39 +0000
Message-ID: <20191102021239.GA24394@dcvr> (raw)
In-Reply-To: <CAAtdryPc3bZ6Ufr=iu41SQd+b7T2WH6Hek0cvYy2GUbpK4hAHA@mail.gmail.com>

Sam Saffron <sam.saffron@gmail.com> 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: <https://80x24.org/mwrap-perl/>

  reply index

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-08 22:52 Sam Saffron
2019-11-02  2:12 ` Eric Wong [this message]
2019-11-03 21:55   ` Sam Saffron

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://80x24.org/mwrap/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191102021239.GA24394@dcvr \
    --to=e@80x24.org \
    --cc=mwrap-public@80x24.org \
    --cc=sam.saffron@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

mwrap user+dev discussion/patches/pulls/bugs/help

Archives are clonable:
	git clone --mirror https://80x24.org/mwrap-public/0 mwrap-public/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 mwrap-public mwrap-public/ https://80x24.org/mwrap-public \
		mwrap-public@80x24.org
	public-inbox-index mwrap-public

Example config snippet for mirrors

Newsgroups are available over NNTP:
	nntp://news.public-inbox.org/inbox.comp.lang.ruby.mwrap
	nntp://ou63pmih66umazou.onion/inbox.comp.lang.ruby.mwrap

 note: .onion URLs require Tor: https://www.torproject.org/

AGPL code for this site: git clone https://public-inbox.org/public-inbox.git