RE : RE : RE : RE : [fpc-pascal] Is such memory statistics possible?

2011-08-21 Thread Ludo Brands
Attached a patch for the following: - ported to win64 - added a Depth parameter to PMMCollectStat (default 15). When the lcl is build with debug line info, the output from PMMCollectStat is cluthered with LCL functions such as message loop/handling functions. Depth is the maximum stack "backtrace"

Re: RE : RE : RE : [fpc-pascal] Is such memory statistics possible?

2011-08-19 Thread Max Vlasov
On Fri, Aug 19, 2011 at 10:36 PM, Ludo Brands wrote: > ** > > > OK compiles now. I tested this with 2 programs but when I include > uProcMemMon as the first unit in lpr and define -dPROCMEMMON then they both > crash with a sigsegv. Undefine PROCMEMMON and they run fine. I've > attached a small

RE : RE : RE : [fpc-pascal] Is such memory statistics possible?

2011-08-19 Thread Ludo Brands
OK compiles now. I tested this with 2 programs but when I include uProcMemMon as the first unit in lpr and define -dPROCMEMMON then they both crash with a sigsegv. Undefine PROCMEMMON and they run fine. I've attached a small testprogram that crashes in bufdataset. Just a small copy paste p

Re: RE : [fpc-pascal] Is such memory statistics possible?

2011-08-19 Thread Max Vlasov
On Fri, Aug 19, 2011 at 3:26 PM, Ludo Brands wrote: > ** > > > > Based on this discussion and the following research I made an attempt to > implement something like this for fpc/lazarus. > > The final result are a couple of units and a dialog that allows to see the > results in any time inside th

RE : [fpc-pascal] Is such memory statistics possible?

2011-08-19 Thread Ludo Brands
Based on this discussion and the following research I made an attempt to implement something like this for fpc/lazarus. The final result are a couple of units and a dialog that allows to see the results in any time inside the program. You can see the real example in the screenshot: http:/

Re: [fpc-pascal] Is such memory statistics possible?

2011-08-19 Thread Max Vlasov
On Mon, Aug 15, 2011 at 1:03 PM, Marco van de Voort wrote: > In our previous episode, Max Vlasov said: > > about collecting some statistics. > > > > The idea is similar to some disk utilities that collects and sort the > sizes > > of directories. You know when every folder on the computer is scan

RE : RE : [fpc-pascal] Is such memory statistics possible?

2011-08-15 Thread Ludo Brands
> On 15 Aug 2011, at 12:03, Ludo Brands wrote: > > > 100.00% (288,964,608B) (page allocation syscalls) mmap/mremap/brk, > > --alloc-fns, etc. > > ->37.20% (107,483,136B) 0x80C7DD3: > > ->SYSTEM_FPSYSCALL$LONGINT$LONGINT$$LONGINT > > (in /home/ludo/lazarus/lazarus) > > | ->37.20% (107,483,136B) 0

Re: RE : [fpc-pascal] Is such memory statistics possible?

2011-08-15 Thread Max Vlasov
On Mon, Aug 15, 2011 at 2:03 PM, Ludo Brands wrote: > ** > > > > if there's a common ancestor allocating something (let's call it NewBlock() > and it uses GetMem) and I have many descendants using this method, is there > a chance to find the "eater" amongst these descendants or massif tool will >

Re: RE : [fpc-pascal] Is such memory statistics possible?

2011-08-15 Thread Jonas Maebe
On 15 Aug 2011, at 12:03, Ludo Brands wrote: > 100.00% (288,964,608B) (page allocation syscalls) mmap/mremap/brk, > --alloc-fns, etc. > ->37.20% (107,483,136B) 0x80C7DD3: SYSTEM_FPSYSCALL$LONGINT$LONGINT$$LONGINT > (in /home/ludo/lazarus/lazarus) > | ->37.20% (107,483,136B) 0x80C86DF: > SYSTEM_FP

RE : [fpc-pascal] Is such memory statistics possible?

2011-08-15 Thread Ludo Brands
if there's a common ancestor allocating something (let's call it NewBlock() and it uses GetMem) and I have many descendants using this method, is there a chance to find the "eater" amongst these descendants or massif tool will drop all the stats to NewBlock()? Max Here is part of the mas

Re: [fpc-pascal] Is such memory statistics possible?

2011-08-15 Thread Max Vlasov
On Mon, Aug 15, 2011 at 1:03 PM, Marco van de Voort wrote: > In our previous episode, Max Vlasov said: > > about collecting some statistics. > > > > The idea is similar to some disk utilities that collects and sort the > sizes > > of directories. You know when every folder on the computer is scan

RE : [fpc-pascal] Is such memory statistics possible?

2011-08-15 Thread Ludo Brands
> In our previous episode, Max Vlasov said: > > about collecting some statistics. > > > > The idea is similar to some disk utilities that collects > and sort the > > sizes of directories. You know when every folder on the computer is > > scanned and all the resulting paths are sorted by the sum

Re: [fpc-pascal] Is such memory statistics possible?

2011-08-15 Thread Marco van de Voort
In our previous episode, Max Vlasov said: > about collecting some statistics. > > The idea is similar to some disk utilities that collects and sort the sizes > of directories. You know when every folder on the computer is scanned and > all the resulting paths are sorted by the summed size. Such ut

[fpc-pascal] Is such memory statistics possible?

2011-08-15 Thread Max Vlasov
Hi, reading the recent discussion about lazarus memory consumption, I thought about collecting some statistics. The idea is similar to some disk utilities that collects and sort the sizes of directories. You know when every folder on the computer is scanned and all the resulting paths are sorted b