Skip Menu |

This queue is for tickets about the Devel-MemoryTrace-Light CPAN distribution.

Report information
The Basics
Id: 96403
Status: rejected
Priority: 0/
Queue: Devel-MemoryTrace-Light

People
Owner: Nobody in particular
Requestors: cpan [...] zoffix.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.09
Fixed in: (no value)



Subject: Doesn't seem to report everything
The module doesn't seem to report memory increases inside main files (as opposed to loaded modules). A sample output looks like this (abridged): Show quoted text
>> 12634 init, 0 (0) used 5111808 bytes >> 12634 CGI, ../ds3_site/CPAN/CGI.pm (869) used 651264 bytes >> 12634 DynaLoader, /usr/lib/perl/5.14/DynaLoader.pm (37) used 163840 bytes >> 12634 strict, /usr/share/perl/5.14/strict.pm (29) used 262144 bytes >> 12634 strict, /usr/share/perl/5.14/strict.pm (36) used 270336 bytes >> 12634 vars, /usr/share/perl/5.14/vars.pm (35) used 270336 bytes >> 12634 DynaLoader, /usr/share/perl/5.14/XSLoader.pm (71) used 28672 bytes >> 12634 Symbol, /usr/share/perl/5.14/Symbol.pm (3) used 262144 bytes >> 12634 DynaLoader, /usr/share/perl/5.14/XSLoader.pm (71) used 77824 bytes >> 12634 MIME::Lite, /home/zoffix/perl5/lib/perl5/MIME/Lite.pm (508) used 532480 bytes >> 12634 strict, /usr/share/perl/5.14/strict.pm (29) used 270336 bytes
If I try out the example shown in the docs, I get no output at all. This is on Debian Wheezy with perl 5.14.2, GTop 0.18, and Devel::MemoryTrace::Light 0.09 -- Cheers, ZZ [ https://metacpan.org/author/ZOFFIX ]
Subject: Re: [rt.cpan.org #96403] Doesn't seem to report everything
Date: Thu, 12 Jun 2014 09:35:37 -0400
To: bug-Devel-MemoryTrace-Light [...] rt.cpan.org
From: "Matthew Horsfall (alh)" <wolfsage [...] gmail.com>
On Thu, Jun 12, 2014 at 9:25 AM, Zoffix Znet via RT <bug-Devel-MemoryTrace-Light@rt.cpan.org> wrote: Show quoted text
> Thu Jun 12 09:25:28 2014: Request 96403 was acted upon. > Transaction: Ticket created by ZOFFIX > Queue: Devel-MemoryTrace-Light > Subject: Doesn't seem to report everything > Broken in: 0.09 > Severity: (no value) > Owner: Nobody > Requestors: cpan@zoffix.com > Status: new > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=96403 > > > > The module doesn't seem to report memory increases inside main files (as opposed to loaded modules). > > A sample output looks like this (abridged):
>>> 12634 init, 0 (0) used 5111808 bytes >>> 12634 CGI, ../ds3_site/CPAN/CGI.pm (869) used 651264 bytes >>> 12634 DynaLoader, /usr/lib/perl/5.14/DynaLoader.pm (37) used 163840 bytes >>> 12634 strict, /usr/share/perl/5.14/strict.pm (29) used 262144 bytes >>> 12634 strict, /usr/share/perl/5.14/strict.pm (36) used 270336 bytes >>> 12634 vars, /usr/share/perl/5.14/vars.pm (35) used 270336 bytes >>> 12634 DynaLoader, /usr/share/perl/5.14/XSLoader.pm (71) used 28672 bytes >>> 12634 Symbol, /usr/share/perl/5.14/Symbol.pm (3) used 262144 bytes >>> 12634 DynaLoader, /usr/share/perl/5.14/XSLoader.pm (71) used 77824 bytes >>> 12634 MIME::Lite, /home/zoffix/perl5/lib/perl5/MIME/Lite.pm (508) used 532480 bytes >>> 12634 strict, /usr/share/perl/5.14/strict.pm (29) used 270336 bytes
> > If I try out the example shown in the docs, I get no output at all. >
The way Perl is grabbing memory can be different depending on compile time options and other factors. It often will pre-allocate much more memory than what you need, and later when you do something that you think *will* get more memory, but is actually pulling from the already allocated pool. Also, this module will only show when your program actually grows in size, and it's entirely possible that your program releases memory back to the OS, and so this module might not see changes until it goes beyond what it's last recorded for the highest amount of used memory. It's imprecise, and can be useful in certain situations, but you may find that it's not helpful for yours. I don't think there's a bug here, but if you'd like to show me the code in question (or perhaps see if you don't get a report on ex.pl with a number much higher than 4096, like 40096), I can look into it more. (Be careful with going too high on that number though, or you may start swapping). -- Matthew Horsfall (alh)
You're right, it works fine with a larger number :) My bad, I should've tested that out first :) -- Cheers, ZZ [ https://metacpan.org/author/ZOFFIX ]
No worries, thanks! -- Matthew Horsfall (alh)