Intel® VTune™ Amplifier XE and Intel® VTune™ Amplifier for Systems Help
To include JIT Profiling support, do one of the following:
Include the following files to your source tree:
jitprofiling.h, located under <install-dir>/include
ittnotify_config.h, ittnotify_types.h and jitprofiling.c, located under <install-dir>/sdk/src/ittnotify
The default installation path for the VTune Amplifier XE is /opt/intel/vtune_amplifier_xe_version. For the VTune Amplifier for Systems, the default <install_dir> is:
Use the static library provided with the product:
Include jitprofiling.h file, located under the <install-dir>/include directory, in your code. This header file provides all API function prototypes and type definitions.
Link to jitprofiling.a, located under <install-dir>/lib32 or <install-dir>/lib32.
Use This Primitive |
To Do This |
---|---|
int iJIT_NotifyEvent( iJIT_JVM_EVENT event_type, void *EventSpecificData ); |
Use this API to send a notification of event_type with the data pointed by EventSpecificData to the agent. The reported information is used to attribute samples obtained from any Intel® VTune™ Amplifier collector. |
unsigned int iJIT_GetNewMethodID( void ); |
Generate a new method ID. You must use this function to assign unique and valid method IDs to methods reported to the profiler. This API returns a new unique method ID. When out of unique method IDs, this API function returns 0. |
iJIT_IsProfilingActiveFlags iJIT_IsProfilingActive( void ); |
Returns the current mode of the profiler: off, or sampling, using the iJIT_IsProfilingActiveFlags enumeration. This API returns iJIT_SAMPLING_ON by default, indicating that Sampling is running. It returns iJIT_NOTHING_RUNNING if no profiler is running. |
You send an event notification to the agent (VTune Amplifier) with event-specific data, which is a structure. The pointers in the structure refer to memory you allocated and you are responsible for releasing it. The pointers are used by the iJIT_NotifyEvent method to copy your data in a trace file, and they are not used after the iJIT_NotifyEvent method returns.
VTune Amplifier is installed with a sample application in the jitprofiling_vtune_amp_xe.tgz that emulates the creation and execution of dynamic code. In addition, it uses the JIT profiling API to notify the VTune Amplifier when it transfers execution control to dynamic code.
To install and set up the sample code: