Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2012-03

heap trace

6 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Antonio Fortuny

Hi all.

Sorry if this is a silly question but I can't find the answer into this forun.
How to get the function names in the heaptrc trace ? I use in project options:
in Linking options:
generate debug info for dgb
show line numbers
use symbol file for gdb
use "heaptrc"

in project .pas the very first line is:
   SetHeapTraceOutput(ChangeFileExt(ParamStr(0), '.log'));

File program.log is created ok:

Heap dump by heaptrc unit
3564 memory blocks allocated : 1746202/1754304
3563 memory blocks freed : 1746174/1754272
1 unfreed memory blocks : 28
True heap size : 425984 (96 used in System startup) True free heap : 429024
Should be : 425792
Call trace for block $001F14E8 size 28
/* $0061997C
$0040D5A4
$00411EC1
*/How to get details about the source code generating those memory leaks ?

Antonio.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20120306/0d9c61c7/attachment.html>

Reply by email

Antonio Fortuny
to Antonio Fortuny

Hi again.
Got it.
-gl was checked but unchecking "use symbol file for gdb" it works again 8-)

Le 06/03/2012 14:55, Antonio Fortuny a ?crit :

Show quoted text 40 lines
Hi all. Sorry if this is a silly question but I can't find the answer into this forun. How to get the function names in the heaptrc trace ? I use in project options: in Linking options: generate debug info for dgb show line numbers use symbol file for gdb use "heaptrc" in project .pas the very first line is: SetHeapTraceOutput(ChangeFileExt(ParamStr(0), '.log')); File program.log is created ok: Heap dump by heaptrc unit 3564 memory blocks allocated : 1746202/1754304 3563 memory blocks freed : 1746174/1754272 1 unfreed memory blocks : 28 True heap size : 425984 (96 used in System startup) True free heap : 429024 Should be : 425792 Call trace for block $001F14E8 size 28 /* $0061997C $0040D5A4 $00411EC1 */How to get details about the source code generating those memory leaks ? Antonio. -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20120306/92857f00/attachment.html>

Reply by email

Martin
to Antonio Fortuny: Hi all. Sorry if this is a silly question but I can't find the answer into this forun.…
Antonio Fortuny wrote 11 lines
Hi all. Sorry if this is a silly question but I can't find the answer into this forun. How to get the function names in the heaptrc trace ? I use in project options: in Linking options: generate debug info for dgb show line numbers use symbol file for gdb use "heaptrc"

that sounds around correct.

Please test those settings on a dummy project
A simple form, in formcreate, create a new object, and never free it

    TObject.Create;

Maybe test with explicit "dwarf" or "stabs" ?

Your FPC is "as installed" or self compiled?

Show quoted text 18 lines
in project .pas the very first line is: SetHeapTraceOutput(ChangeFileExt(ParamStr(0), '.log')); File program.log is created ok: Heap dump by heaptrc unit 3564 memory blocks allocated : 1746202/1754304 3563 memory blocks freed : 1746174/1754272 1 unfreed memory blocks : 28 True heap size : 425984 (96 used in System startup) True free heap : 429024 Should be : 425792 Call trace for block $001F14E8 size 28 /* $0061997C $0040D5A4 $00411EC1 */How to get details about the source code generating those memory leaks ?

The first line, looks like it may not be in your code.

It may be there is no info for the $0061... address.

the code that generates the dumps, stops adding line info, once it has failed a single line....
See: http://bugs.freepascal.org/view.php?id=13518

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20120306/8c0065c0/attachment.html>

Reply by email

Martin
to Antonio Fortuny: Hi again. Got it. -gl was checked but unchecking "use symbol file for gdb" it works again…
Antonio Fortuny wrote
Hi again. Got it. -gl was checked but unchecking "use symbol file for gdb" it works again 8-)

AH,

maybe add a feature request, that this adds a warning, when you set those options....

Show quoted text 50 lines
Le 06/03/2012 14:55, Antonio Fortuny a ?crit : > Hi all. > > Sorry if this is a silly question but I can't find the answer into > this forun. > How to get the function names in the heaptrc trace ? > I use in project options: > in Linking options: > generate debug info for dgb > show line numbers > use symbol file for gdb > use "heaptrc" > > in project .pas the very first line is: > SetHeapTraceOutput(ChangeFileExt(ParamStr(0), '.log')); > > File program.log is created ok: > > Heap dump by heaptrc unit > 3564 memory blocks allocated : 1746202/1754304 > 3563 memory blocks freed : 1746174/1754272 > 1 unfreed memory blocks : 28 > True heap size : 425984 (96 used in System startup) > True free heap : 429024 > Should be : 425792 > Call trace for block $001F14E8 size 28 > /* $0061997C > $0040D5A4 > $00411EC1 > */How to get details about the source code generating those memory > leaks ? > > Antonio. > > > > > -- > _______________________________________________ > Lazarus mailing list > > http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20120306/8bff90a6/attachment-0001.html>

Reply by email

Antonio Fortuny
to Martin

I confirm:
compiling with "use symbol file for gdb" suppresses line references in heaptrc output
unchecking the checkbox restores line references again. I made a rebuid each time.
Sounds like a bug but I'm not yet sure it is.

Le 06/03/2012 15:15, Martin a ?crit :

Show quoted text 10 lines
On 06/03/2012 14:05, Antonio Fortuny wrote: > Hi again. > Got it. > -gl was checked but unchecking "use symbol file for gdb" it works > again 8-) AH, maybe add a feature request, that this adds a warning, when you set those options....

Hum, how to achieve this ?

Show quoted text 59 lines
> > Le 06/03/2012 14:55, Antonio Fortuny a ?crit : >> Hi all. >> >> Sorry if this is a silly question but I can't find the answer into >> this forun. >> How to get the function names in the heaptrc trace ? >> I use in project options: >> in Linking options: >> generate debug info for dgb >> show line numbers >> use symbol file for gdb >> use "heaptrc" >> >> in project .pas the very first line is: >> SetHeapTraceOutput(ChangeFileExt(ParamStr(0), '.log')); >> >> File program.log is created ok: >> >> Heap dump by heaptrc unit >> 3564 memory blocks allocated : 1746202/1754304 >> 3563 memory blocks freed : 1746174/1754272 >> 1 unfreed memory blocks : 28 >> True heap size : 425984 (96 used in System startup) >> True free heap : 429024 >> Should be : 425792 >> Call trace for block $001F14E8 size 28 >> /* $0061997C >> $0040D5A4 >> $00411EC1 >> */How to get details about the source code generating those memory >> leaks ? >> >> Antonio. >> >> >> >> >> -- >> _______________________________________________ >> Lazarus mailing list >> >> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus > > > -- > _______________________________________________ > Lazarus mailing list > > http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20120306/02bb771c/attachment.html>

Reply by email

Martin
to Antonio Fortuny
Antonio Fortuny wrote 6 lines
I confirm: compiling with "use symbol file for gdb" suppresses line references in heaptrc output unchecking the checkbox restores line references again. I made a rebuid each time. Sounds like a bug but I'm not yet sure it is.

You need to check on thhe fpc list, what is intended -------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20120306/cfacb41e/attachment.html>

Reply by email