This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: printing collector statistics


Delvin Defoe wrote:
Hi:

I am implementing a garbage collector that supports multiple threads
on multiple processors.  The collector mostly works however, I would
like to instrument it to generate timiing and other statistics for the
main thread and for every other thread.  For the main thread, I would
need to know where it begins and where it ends its execution.  I
believe it starts its execution in function _Jv_RunMain (vm_args,
klass, name, argc, argv, is_jar) in file libjava/prims.cc.  I was
expecting to call the function that prints the statistis for that
thread at the end of this function.  However, that does not work.  Any
ideas on where I should call that function?

For other threads, I get it to work by placing the call at the end of
function really_start(void *x) in file libjava/posix-threads.cc.

I would appreciate any feedback you can give.


Look at:


gnu/java/lang/natMainThread.cc

David Daney


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]