This question has been asked on a few occasions in the past, most recently (that I can find) about three years ago. Actually, I am pretty surprised that there does not seem to be an answer along the lines of: "Oh yes, you do this ...".
Is there a way that I can get a complete heap dump of all application data from a Perl program, like an hprof dump from a Sun JVM? I realise that this might be a rather blunt instrument but sometimes sifting through the data is the best way to get to the bottom of a problem.
Why? I'm working on an application - a long-running server program - which, under poorly-defined circumstances, exhibits massive memory growth. This could be a 'leak' (as in a discarded circular reference chain) or it could just be uncontrolled growth of some data structure. The program is large and complex and written by many people and I have little clue which module(s) may be responsible. So picking through details of a dump seems like a good strategy; except that I cannot work out how to get such a dump.
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|