I haven't tried this, but I have been mulling it for some time: using Dtrace to debug Perl.
Of course, you'd have to be on *BSD or OS-X (or Soracle), But if that's Ok, using runtime probes seems very promising for the memory leak/out of memory problem area. I saw a good tutorial at OSCON on the subject, and it had a Python section, I put on my TODO list the idea of making an equivalent for Perl last year... But never got to it. I suppose on Linux Systemtap may fit the bill... But the upstream kernel guys give it such bad Karma that I haven't spent time on it. Best-Federico On Mar 8, 2011, at 22:52, Tom Metro <[email protected]> wrote: > Some code I'm working on is triggering an out of memory error, and I'd > like to figure out what specifically is responsible. (It's a complex > system with dozens of libraries and it runs in parallel across a cluster > of machines. Running the code in a debugger isn't a practical option.) > > Any recommendation for tools to do this? > > I don't recall if the typical profiling tools record memory usage, but a > traditional profiler would be overkill for what I need. > > The ideal solution would be something that could hook the OOM exception > and dump the symbol table along with stats for how much memory each > symbol is occupying. Another useful possibility would be dumping the > call stack. > > Is it possible to trap the OOM error? I don't think a __DIE__ handler > catches it. It seems to be an unusual error in that you often see > multiple of them, as if the first few are warnings, and then eventually > it is fatal. > > -Tom > > -- > Tom Metro > Venture Logic, Newton, MA, USA > "Enterprise solutions through open source." > Professional Profile: http://tmetro.venturelogic.com/ > > _______________________________________________ > Boston-pm mailing list > [email protected] > http://mail.pm.org/mailman/listinfo/boston-pm _______________________________________________ Boston-pm mailing list [email protected] http://mail.pm.org/mailman/listinfo/boston-pm

