Could the JIT be started before JVMTI agents are loaded?
Daniel D. Daugherty
Daniel.Daugherty at Sun.COM
Thu Jun 25 07:55:29 PDT 2009
The compiler is initialized after JVMTI has posted the VM_INIT
event intentionally. The compiler may have to initialize differently
depending on the capabilities that were enabled by the JVMTI agent.
Dan
Volker Simonis wrote:
> 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