more useful options | |
PerlMonks |
Re: Getting a memory dumpby okram (Monk) |
on Nov 23, 2007 at 08:18 UTC ( [id://652524]=note: print w/replies, xml ) | Need Help?? |
I see this as an XY problem.. you have a problem with X (high memory), and decide to do Y (dump of all the data) to try and solve it... based on the false assumption that Y will actually help you solving X. Many of the modules in the Devel:: category will help you "solving" Y: Devel::Peek will help you seeing the Dump() of every variable you use, showing you the exact data that Perl is using for it, such as showing you the value of the variable, the number of reference counts to it, the flags, etc.etc. Instead, Devel::Size will tell you the exact memory allocated for each of the entitites (watch out for reference though:
Somehow, I don't think that Devel::Peek or Devel::Size will help you much. Now, off to solving X: have you tried using DProf and analysing where your code is spending its time? Are you using warnings/strict/diagnostic, and tried using hooks to the functions you think might cause the problem, via Hook::LexWrap? you can then wrap pieces of debugging code around any function, time it, check anything you want prior to and after the execution of any function.. Just my 0.01
In Section
Seekers of Perl Wisdom
|
|