Gathering info on all methods

Godmar Back gback at cs.utah.edu
Wed Oct 21 09:07:19 PDT 1998


> 
> I am trying to get information on all the methods that
> were ever invoked.
> 
> What I did was scan the classEntryPool. Basically
> I have a function which does this.
> 
> However the problem is that I do not know from where
> I should be calling it.
> 
> I tried to call it after
> the callStaticVoid in main2(), but it only gets
> called sometimes, i.e. it seems as if the thread
> dies before it reaches the place where I call
> my function. This is a normal flow of control.
> 
> REgistering it with atexit() does not help
> because it seems that the stuff in the classEntryPool
> is all gone.
> 
> Is there a way I can find out when some thread dies,
> that there are no other threads (so this is the last
> thread to die), then I can call my function.
> 
> Perhaps there is a much better way of doing this??
> 

An easy way is to set
    vmargs.exit = your_exit_hook;
after the call to JNI_GetDefaultJavaVMInitArgs.

	- Godmar



More information about the kaffe mailing list