[kaffe] memory traces from Kaffe
hkraemer at freenet.de
Tue Sep 2 04:31:02 PDT 2003
On Mon, 1 Sep 2003 22:52:07 -0700 (PDT)
who knows <stzdmr at yahoo.com> wrote:
> I am working on data memory reference patterns of java
> programs. Basically I want to see memory traces of
> different Java programs running on Kaffe.
> I modified the file $ROOT/Kaffe/Kaffevm/mem/gc-mem.c
> to get the malloc/free trace.
> I get the "malloc" value from function
> "gc_heap_free(void* mem)" and "free" value from
> "gc_heap_free(void* mem)".
> And I also pulled out and used Java programs from
> JVM98 to test my traces.
> Here is my problem for any java program (jess, check,
> etc) that I run I get the similar memory trace. The
> sizes of the trace files are different (various from
> 300K to 80Mb) but the patterns are same.
> I believe, it should not be like this. Is there anyone
> who can tell me what I am doing wrong?
sorry, I seem to have mislaid my crystal sphere, so without
some source code, i can just guess that you're printing nsz
instead of sz?
However, gc_heap_malloc and gc_heap_free are probably not
the right functions to print the malloc and free traces;
these functions don't distinguish between memory that's
allocated for the java application itself (say for new objects)
and memory that's allocated for vm internal data structures.
So if you want to exclude the vm internal data structures
from your traces, you'll have to put the creation of the
traces into gcMalloc and finishGC.
More information about the kaffe