This is a message I originally sent privately to Andrew Haley, however
it might be useful with your problem as well (and the gcj community in
general).
David Daney
We have exactly this. I don't think it works with the BC_ABI. Also it
is only tested on mipsel-linux. gcj-3.4.3
The things in memorydump.tgz are linked into the application under test.
We added it to libgcj.
memorydumpanalize.tgz analizes the dump off-line.
To generate the dump do:
com.avtrex.test.memory.GCInfo.enumerate("%03d-dump.txt");
To analize the dump do:
java -Xmx512m com.avtrex.test.analyze.MemoryAnalyze [name_of_dump_file]
The executable image and libgcj.so must be in the current directory.
Also the name of nm (mipsel-linux-nm) is hard coded so you will have to
fix that.
The code is a bit of a hack. If you like it I was thinking of cleaning
it up and contributing it to GCC.
More instructions:
Put all of these items in a directory:
The memory log files. Typical example: 2 files, 001-nomem.log and
001-nomem.log.bytes
The excutable program
The gcj library (like libgcj.so.4.0.0 or libgcj.so.4.0.0.nomal)
Cd to that directory
Java âXmx512m âcp analyze.jar com.avtrex.test.analyze.MemoryAnalyze
001-nomem.log
Be sure to use a full path for analyze.jar if it isnât in the current
directory, and replace 001-nomem.log with the appropriate memory dump
file.