Could the JIT be started before JVMTI agents are loaded?

Volker Simonis volker.simonis at gmail.com
Thu Jun 25 03:06:55 PDT 2009


Hi,

we currently have some problems with long startup times due to JVMTI
agents loaded with -javaagent. While investigating the problem we
realized that the JIT compiler is only started AFTER the agent was
loaded and initialized and therefore the whole agent initialization
takes place in interpreted mode. Here is the corresponding code from
thread.cpp:

     3137   // Notify JVMTI agents that VM initialization is complete
- nop if no agents.
     3138   JvmtiExport::post_vm_initialized();
     3139
     3140   Chunk::start_chunk_pool_cleaner_task();
     3141
     3142   // initialize compiler(s)
     3143   CompileBroker::compilation_init();

Is there any particualr reason that the JIT gets initialized only
after the agent initialization or could it be done just as well
before? A short test where we placed
"CompileBroker::compilation_init()" just before
"JvmtiExport::post_vm_initialized()" succeeded with a considerable
startup speedup, but we are not sure if this change would be valid in
general.

Regards,
Volker



More information about the hotspot-dev mailing list