Using JIT API
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 (Windows*) or <install-dir>/include (Linux*)ittnotify_config.h
,ittnotify_types.h
andjitprofiling.c
, located under <install-dir>sdksrcittnotify (Windows*) or <install-dir>/sdk/src/ittnotify (Linux*)
Note
To locate your <install-dir> see Installation Directory.
Use the static library provided with the product:
Include
jitprofiling.h
file, located under the <install-dir>include (Windows*) or <install-dir>/include (Linux*) directory, in your code. This header file provides all API function prototypes and type definitions.Link to
jitprofiling.lib
(Windows*) orjitprofiling.a
(Linux*), located under <install-dir>lib32or <install-dir>lib64 (Windows*) or <install-dir>/lib32 or <install-dir>/lib32 (Linux*).
Use This Primitive |
To Do This |
|
Use this API to send a notification of |
|
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. |
|
Returns the current mode of the profiler: off, or sampling, using the
|
Lifetime of Allocated Data
You send an event notification to the agent (Collector) 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.