. . .
Right. I agree, this will allow to make a progress and get more experience first.
You can look at these two functions in the jvmtiManageCapabilities.cpp: 144 jvmtiCapabilities JvmtiManageCapabilities::init_always_solo_capabilities() { 145 jvmtiCapabilities jc; 146 147 memset(&jc, 0, sizeof(jc)); 148 jc.can_suspend = 1; 149 return jc; 150 } 151 152 153 jvmtiCapabilities JvmtiManageCapabilities::init_onload_solo_capabilities() { 154 jvmtiCapabilities jc; 155 156 memset(&jc, 0, sizeof(jc)); 157 jc.can_generate_field_modification_events = 1; 158 jc.can_generate_field_access_events = 1; 159 jc.can_generate_breakpoint_events = 1; 160 return jc; 161 } The can_suspend is always solo but other 3 capabilities are onload solo. Probably, onload solo would work well for your purpose. So that it is possible to follow one of these pattern, for example, can_generate_breakpoint_events. You can check all uses of it in the JVMTI spec and the hotspot sources. Also, look at the generated file: build/linux-x86_64-normal-server-release/hotspot/variant-server/gensrc/jvmtifiles/jvmtiEnter.cpp (You may have different kind of build so, just replace the suffix "linux-x86_64-normal-server-release" with yours. You will find a couple of conditions like this: 2873 if (jvmti_env->get_capabilities()->can_generate_breakpoint_events == 0) { 2874 return JVMTI_ERROR_MUST_POSSESS_CAPABILITY; 2875 } In your case such checks will be also auto-generated from your version of the jvmti.xml. The newly generated jvmti.html can be found in the same build folder too. You may need to look at this JVMTI spec section: http://docs.oracle.com/javase/8/docs/platform/jvmti/jvmti.html#capability on how to add the needed capability. Please, ask questions if you have. I hope, somebody will be able to answer, or I'll do it when get a chance. Thanks, Serguei
|
- Re: Low-Overhead Heap Profiling serguei.spit...@oracle.com
- Re: Low-Overhead Heap Profiling Robbin Ehn
- Re: Low-Overhead Heap Profiling JC Beyler
- Re: Low-Overhead Heap Profiling JC Beyler
- Re: Low-Overhead Heap Profiling Robbin Ehn
- Re: Low-Overhead Heap Profilin... Robbin Ehn
- Re: Low-Overhead Heap Profilin... Robbin Ehn
- Re: Low-Overhead Heap Profilin... Thomas Schatzl
- Re: Low-Overhead Heap Profilin... serguei.spit...@oracle.com
- Re: Low-Overhead Heap Profilin... serguei.spit...@oracle.com
- Re: Low-Overhead Heap Profilin... serguei.spit...@oracle.com
- Re: Low-Overhead Heap Profilin... serguei.spit...@oracle.com
- Re: Low-Overhead Heap Profilin... Thomas Schatzl
- Re: Low-Overhead Heap Profilin... Robbin Ehn
- Re: Low-Overhead Heap Profilin... Robbin Ehn
- Re: Low-Overhead Heap Profilin... JC Beyler
- Re: Low-Overhead Heap Profilin... JC Beyler
- Re: Low-Overhead Heap Profilin... Robbin Ehn
- Re: Low-Overhead Heap Profilin... JC Beyler
- Re: Low-Overhead Heap Profilin... Robbin Ehn
- Re: Low-Overhead Heap Profilin... Thomas Schatzl