Path: blob/master/3rdparty/ittnotify/include/jitprofiling.h
16337 views
/* <copyright>1This file is provided under a dual BSD/GPLv2 license. When using or2redistributing this file, you may do so under either license.34GPL LICENSE SUMMARY56Copyright (c) 2005-2014 Intel Corporation. All rights reserved.78This program is free software; you can redistribute it and/or modify9it under the terms of version 2 of the GNU General Public License as10published by the Free Software Foundation.1112This program is distributed in the hope that it will be useful, but13WITHOUT ANY WARRANTY; without even the implied warranty of14MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU15General Public License for more details.1617You should have received a copy of the GNU General Public License18along with this program; if not, write to the Free Software19Foundation, Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.20The full GNU General Public License is included in this distribution21in the file called LICENSE.GPL.2223Contact Information:24http://software.intel.com/en-us/articles/intel-vtune-amplifier-xe/2526BSD LICENSE2728Copyright (c) 2005-2014 Intel Corporation. All rights reserved.29All rights reserved.3031Redistribution and use in source and binary forms, with or without32modification, are permitted provided that the following conditions33are met:3435* Redistributions of source code must retain the above copyright36notice, this list of conditions and the following disclaimer.37* Redistributions in binary form must reproduce the above copyright38notice, this list of conditions and the following disclaimer in39the documentation and/or other materials provided with the40distribution.41* Neither the name of Intel Corporation nor the names of its42contributors may be used to endorse or promote products derived43from this software without specific prior written permission.4445THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS46"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT47LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR48A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT49OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,50SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT51LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,52DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY53THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT54(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE55OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.56</copyright> */5758#ifndef __JITPROFILING_H__59#define __JITPROFILING_H__6061/**62* @brief JIT Profiling APIs63*64* The JIT Profiling API is used to report information about just-in-time65* generated code that can be used by performance tools. The user inserts66* calls in the code generator to report information before JIT-compiled67* code goes to execution. This information is collected at runtime and used68* by tools like Intel(R) VTune(TM) Amplifier to display performance metrics69* associated with JIT-compiled code.70*71* These APIs can be used to\n72* - **Profile trace-based and method-based JIT-compiled73* code**. Some examples of environments that you can profile with these APIs:74* dynamic JIT compilation of JavaScript code traces, JIT execution in OpenCL(TM)75* software technology, Java/.NET managed execution environments, and custom76* ISV JIT engines.77* @code78* #include <jitprofiling.h>79*80* if (iJIT_IsProfilingActive != iJIT_SAMPLING_ON) {81* return;82* }83*84* iJIT_Method_Load jmethod = {0};85* jmethod.method_id = iJIT_GetNewMethodID();86* jmethod.method_name = "method_name";87* jmethod.class_file_name = "class_name";88* jmethod.source_file_name = "source_file_name";89* jmethod.method_load_address = code_addr;90* jmethod.method_size = code_size;91*92* iJIT_NotifyEvent(iJVM_EVENT_TYPE_METHOD_LOAD_FINISHED, (void*)&jmethod);93* iJIT_NotifyEvent(iJVM_EVENT_TYPE_SHUTDOWN, NULL);94* @endcode95*96* * Expected behavior:97* * If any iJVM_EVENT_TYPE_METHOD_LOAD_FINISHED event overwrites an98* already reported method, then such a method becomes invalid and its99* memory region is treated as unloaded. VTune Amplifier displays the metrics100* collected by the method until it is overwritten.101* * If supplied line number information contains multiple source lines for102* the same assembly instruction (code location), then VTune Amplifier picks up103* the first line number.104* * Dynamically generated code can be associated with a module name.105* Use the iJIT_Method_Load_V2 structure.\n106* Clarification of some cases:107* * If you register a function with the same method ID multiple times,108* specifying different module names, then the VTune Amplifier picks up109* the module name registered first. If you want to distinguish the same110* function between different JIT engines, supply different method IDs for111* each function. Other symbolic information (for example, source file)112* can be identical.113*114* - **Analyze split functions** (multiple joint or disjoint code regions115* belonging to the same function) **including re-JIT**116* with potential overlapping of code regions in time, which is common in117* resource-limited environments.118* @code119* #include <jitprofiling.h>120*121* unsigned int method_id = iJIT_GetNewMethodID();122*123* iJIT_Method_Load a = {0};124* a.method_id = method_id;125* a.method_load_address = 0x100;126* a.method_size = 0x20;127*128* iJIT_Method_Load b = {0};129* b.method_id = method_id;130* b.method_load_address = 0x200;131* b.method_size = 0x30;132*133* iJIT_NotifyEvent(iJVM_EVENT_TYPE_METHOD_LOAD_FINISHED, (void*)&a);134* iJIT_NotifyEvent(iJVM_EVENT_TYPE_METHOD_LOAD_FINISHED, (void*)&b);135* @endcode136*137* * Expected behaviour:138* * If a iJVM_EVENT_TYPE_METHOD_LOAD_FINISHED event overwrites an139* already reported method, then such a method becomes invalid and140* its memory region is treated as unloaded.141* * All code regions reported with the same method ID are considered as142* belonging to the same method. Symbolic information (method name,143* source file name) will be taken from the first notification, and all144* subsequent notifications with the same method ID will be processed145* only for line number table information. So, the VTune Amplifier will map146* samples to a source line using the line number table from the current147* notification while taking the source file name from the very first one.\n148* Clarification of some cases:\n149* * If you register a second code region with a different source file150* name and the same method ID, then this information will be saved and151* will not be considered as an extension of the first code region, but152* VTune Amplifier will use the source file of the first code region and map153* performance metrics incorrectly.154* * If you register a second code region with the same source file as155* for the first region and the same method ID, then the source file will be156* discarded but VTune Amplifier will map metrics to the source file correctly.157* * If you register a second code region with a null source file and158* the same method ID, then provided line number info will be associated159* with the source file of the first code region.160*161* - **Explore inline functions** including multi-level hierarchy of162* nested inline methods which shows how performance metrics are distributed through them.163* @code164* #include <jitprofiling.h>165*166* // method_id parent_id167* // [-- c --] 3000 2000168* // [---- d -----] 2001 1000169* // [---- b ----] 2000 1000170* // [------------ a ----------------] 1000 n/a171*172* iJIT_Method_Load a = {0};173* a.method_id = 1000;174*175* iJIT_Method_Inline_Load b = {0};176* b.method_id = 2000;177* b.parent_method_id = 1000;178*179* iJIT_Method_Inline_Load c = {0};180* c.method_id = 3000;181* c.parent_method_id = 2000;182*183* iJIT_Method_Inline_Load d = {0};184* d.method_id = 2001;185* d.parent_method_id = 1000;186*187* iJIT_NotifyEvent(iJVM_EVENT_TYPE_METHOD_LOAD_FINISHED, (void*)&a);188* iJIT_NotifyEvent(iJVM_EVENT_TYPE_METHOD_INLINE_LOAD_FINISHED, (void*)&b);189* iJIT_NotifyEvent(iJVM_EVENT_TYPE_METHOD_INLINE_LOAD_FINISHED, (void*)&c);190* iJIT_NotifyEvent(iJVM_EVENT_TYPE_METHOD_INLINE_LOAD_FINISHED, (void*)&d);191* @endcode192*193* * Requirements:194* * Each inline (iJIT_Method_Inline_Load) method should be associated195* with two method IDs: one for itself; one for its immediate parent.196* * Address regions of inline methods of the same parent method cannot197* overlap each other.198* * Execution of the parent method must not be started until it and all199* its inline methods are reported.200* * Expected behaviour:201* * In case of nested inline methods an order of202* iJVM_EVENT_TYPE_METHOD_INLINE_LOAD_FINISHED events is not important.203* * If any event overwrites either inline method or top parent method,204* then the parent, including inline methods, becomes invalid and its memory205* region is treated as unloaded.206*207* **Life time of allocated data**\n208* The client sends an event notification to the agent with event-specific209* data, which is a structure. The pointers in the structure refer to memory210* allocated by the client, which responsible for releasing it. The pointers are211* used by the iJIT_NotifyEvent method to copy client's data in a trace file,212* and they are not used after the iJIT_NotifyEvent method returns.213*/214215/**216* @defgroup jitapi JIT Profiling217* @ingroup internal218* @{219*/220221/**222* @brief Enumerator for the types of notifications223*/224typedef enum iJIT_jvm_event225{226iJVM_EVENT_TYPE_SHUTDOWN = 2, /**<\brief Send this to shutdown the agent.227* Use NULL for event data. */228229iJVM_EVENT_TYPE_METHOD_LOAD_FINISHED = 13, /**<\brief Send when dynamic code is230* JIT compiled and loaded into231* memory by the JIT engine, but232* before the code is executed.233* Use iJIT_Method_Load as event234* data. */235/** @cond exclude_from_documentation */236iJVM_EVENT_TYPE_METHOD_UNLOAD_START, /**<\brief Send when compiled dynamic237* code is being unloaded from memory.238* Use iJIT_Method_Load as event data.*/239/** @endcond */240241iJVM_EVENT_TYPE_METHOD_UPDATE, /**<\brief Send to provide new content for242* a previously reported dynamic code.243* The previous content will be invalidated244* starting from the time of the notification.245* Use iJIT_Method_Load as event data but246* required fields are following:247* - method_id identify the code to update.248* - method_load_address specify start address249* within identified code range250* where update should be started.251* - method_size specify length of updated code252* range. */253254255iJVM_EVENT_TYPE_METHOD_INLINE_LOAD_FINISHED, /**<\brief Send when an inline dynamic256* code is JIT compiled and loaded257* into memory by the JIT engine,258* but before the parent code region259* starts executing.260* Use iJIT_Method_Inline_Load as event data.*/261262/** @cond exclude_from_documentation */263iJVM_EVENT_TYPE_METHOD_UPDATE_V2,264/** @endcond */265266iJVM_EVENT_TYPE_METHOD_LOAD_FINISHED_V2 = 21, /**<\brief Send when a dynamic code is267* JIT compiled and loaded into268* memory by the JIT engine, but269* before the code is executed.270* Use iJIT_Method_Load_V2 as event data. */271272iJVM_EVENT_TYPE_METHOD_LOAD_FINISHED_V3 /**<\brief Send when a dynamic code is273* JIT compiled and loaded into274* memory by the JIT engine, but275* before the code is executed.276* Use iJIT_Method_Load_V3 as event data. */277} iJIT_JVM_EVENT;278279/**280* @brief Enumerator for the agent's mode281*/282typedef enum _iJIT_IsProfilingActiveFlags283{284iJIT_NOTHING_RUNNING = 0x0000, /**<\brief The agent is not running;285* iJIT_NotifyEvent calls will286* not be processed. */287iJIT_SAMPLING_ON = 0x0001, /**<\brief The agent is running and288* ready to process notifications. */289} iJIT_IsProfilingActiveFlags;290291/**292* @brief Description of a single entry in the line number information of a code region.293* @details A table of line number entries gives information about how the reported code region294* is mapped to source file.295* Intel(R) VTune(TM) Amplifier uses line number information to attribute296* the samples (virtual address) to a line number. \n297* It is acceptable to report different code addresses for the same source line:298* @code299* Offset LineNumber300* 1 2301* 12 4302* 15 2303* 18 1304* 21 30305*306* VTune Amplifier constructs the following table using the client data307*308* Code subrange Line number309* 0-1 2310* 1-12 4311* 12-15 2312* 15-18 1313* 18-21 30314* @endcode315*/316typedef struct _LineNumberInfo317{318unsigned int Offset; /**<\brief Offset from the begining of the code region. */319unsigned int LineNumber; /**<\brief Matching source line number offset (from beginning of source file). */320321} *pLineNumberInfo, LineNumberInfo;322323/**324* @brief Enumerator for the code architecture.325*/326typedef enum _iJIT_CodeArchitecture327{328iJIT_CA_NATIVE = 0, /**<\brief Native to the process architecture that is calling it. */329330iJIT_CA_32, /**<\brief 32-bit machine code. */331332iJIT_CA_64 /**<\brief 64-bit machine code. */333334} iJIT_CodeArchitecture;335336#pragma pack(push, 8)337338/**339* @brief Description of a JIT-compiled method340* @details When you use the iJIT_Method_Load structure to describe341* the JIT compiled method, use iJVM_EVENT_TYPE_METHOD_LOAD_FINISHED342* as an event type to report it.343*/344typedef struct _iJIT_Method_Load345{346unsigned int method_id; /**<\brief Unique method ID. Cannot be 0.347* You must either use the API function348* iJIT_GetNewMethodID to get a valid and unique349* method ID, or else manage ID uniqueness350* and correct range by yourself.\n351* You must use the same method ID for all code352* regions of the same method, otherwise different353* method IDs specify different methods. */354355char* method_name; /**<\brief The name of the method. It can be optionally356* prefixed with its class name and appended with357* its complete signature. Can't be NULL. */358359void* method_load_address; /**<\brief The start virtual address of the method code360* region. If NULL, data provided with361* event are not accepted. */362363unsigned int method_size; /**<\brief The code size of the method in memory.364* If 0, then data provided with the event are not365* accepted. */366367unsigned int line_number_size; /**<\brief The number of entries in the line number368* table.0 if none. */369370pLineNumberInfo line_number_table; /**<\brief Pointer to the line numbers info371* array. Can be NULL if372* line_number_size is 0. See373* LineNumberInfo Structure for a374* description of a single entry in375* the line number info array */376377unsigned int class_id; /**<\brief This field is obsolete. */378379char* class_file_name; /**<\brief Class name. Can be NULL.*/380381char* source_file_name; /**<\brief Source file name. Can be NULL.*/382383} *piJIT_Method_Load, iJIT_Method_Load;384385/**386* @brief Description of a JIT-compiled method387* @details When you use the iJIT_Method_Load_V2 structure to describe388* the JIT compiled method, use iJVM_EVENT_TYPE_METHOD_LOAD_FINISHED_V2389* as an event type to report it.390*/391typedef struct _iJIT_Method_Load_V2392{393unsigned int method_id; /**<\brief Unique method ID. Cannot be 0.394* You must either use the API function395* iJIT_GetNewMethodID to get a valid and unique396* method ID, or else manage ID uniqueness397* and correct range by yourself.\n398* You must use the same method ID for all code399* regions of the same method, otherwise different400* method IDs specify different methods. */401402char* method_name; /**<\brief The name of the method. It can be optionally403* prefixed with its class name and appended with404* its complete signature. Can't be NULL. */405406void* method_load_address; /**<\brief The start virtual address of the method code407* region. If NULL, then data provided with the408* event are not accepted. */409410unsigned int method_size; /**<\brief The code size of the method in memory.411* If 0, then data provided with the event are not412* accepted. */413414unsigned int line_number_size; /**<\brief The number of entries in the line number415* table. 0 if none. */416417pLineNumberInfo line_number_table; /**<\brief Pointer to the line numbers info418* array. Can be NULL if419* line_number_size is 0. See420* LineNumberInfo Structure for a421* description of a single entry in422* the line number info array. */423424char* class_file_name; /**<\brief Class name. Can be NULL. */425426char* source_file_name; /**<\brief Source file name. Can be NULL. */427428char* module_name; /**<\brief Module name. Can be NULL.429The module name can be useful for distinguishing among430different JIT engines. VTune Amplifier will display431reported methods grouped by specific module. */432433} *piJIT_Method_Load_V2, iJIT_Method_Load_V2;434435/**436* @brief Description of a JIT-compiled method437* @details The iJIT_Method_Load_V3 structure is the same as iJIT_Method_Load_V2438* with a newly introduced 'arch' field that specifies architecture of the code region.439* When you use the iJIT_Method_Load_V3 structure to describe440* the JIT compiled method, use iJVM_EVENT_TYPE_METHOD_LOAD_FINISHED_V3441* as an event type to report it.442*/443typedef struct _iJIT_Method_Load_V3444{445unsigned int method_id; /**<\brief Unique method ID. Cannot be 0.446* You must either use the API function447* iJIT_GetNewMethodID to get a valid and unique448* method ID, or manage ID uniqueness449* and correct range by yourself.\n450* You must use the same method ID for all code451* regions of the same method, otherwise they are452* treated as regions of different methods. */453454char* method_name; /**<\brief The name of the method. It can be optionally455* prefixed with its class name and appended with456* its complete signature. Cannot be NULL. */457458void* method_load_address; /**<\brief The start virtual address of the method code459* region. If NULL, then data provided with the460* event are not accepted. */461462unsigned int method_size; /**<\brief The code size of the method in memory.463* If 0, then data provided with the event are not464* accepted. */465466unsigned int line_number_size; /**<\brief The number of entries in the line number467* table. 0 if none. */468469pLineNumberInfo line_number_table; /**<\brief Pointer to the line numbers info470* array. Can be NULL if471* line_number_size is 0. See472* LineNumberInfo Structure for a473* description of a single entry in474* the line number info array. */475476char* class_file_name; /**<\brief Class name. Can be NULL. */477478char* source_file_name; /**<\brief Source file name. Can be NULL. */479480char* module_name; /**<\brief Module name. Can be NULL.481* The module name can be useful for distinguishing among482* different JIT engines. VTune Amplifier will display483* reported methods grouped by specific module. */484485iJIT_CodeArchitecture module_arch; /**<\brief Architecture of the method's code region.486* By default, it is the same as the process487* architecture that is calling it.488* For example, you can use it if your 32-bit JIT489* engine generates 64-bit code.490*491* If JIT engine reports both 32-bit and 64-bit types492* of methods then VTune Amplifier splits the methods493* with the same module name but with different494* architectures in two different modules. VTune Amplifier495* modifies the original name provided with a 64-bit method496* version by ending it with '(64)' */497498} *piJIT_Method_Load_V3, iJIT_Method_Load_V3;499500/**501* @brief Description of an inline JIT-compiled method502* @details When you use the_iJIT_Method_Inline_Load structure to describe503* the JIT compiled method, use iJVM_EVENT_TYPE_METHOD_INLINE_LOAD_FINISHED504* as an event type to report it.505*/506typedef struct _iJIT_Method_Inline_Load507{508unsigned int method_id; /**<\brief Unique method ID. Cannot be 0.509* You must either use the API function510* iJIT_GetNewMethodID to get a valid and unique511* method ID, or else manage ID uniqueness512* and correct range by yourself. */513514unsigned int parent_method_id; /**<\brief Unique immediate parent's method ID.515* Cannot be 0.516* You must either use the API function517* iJIT_GetNewMethodID to get a valid and unique518* method ID, or else manage ID uniqueness519* and correct range by yourself. */520521char* method_name; /**<\brief The name of the method. It can be optionally522* prefixed with its class name and appended with523* its complete signature. Can't be NULL. */524525void* method_load_address; /** <\brief The virtual address on which the method526* is inlined. If NULL, then data provided with527* the event are not accepted. */528529unsigned int method_size; /**<\brief The code size of the method in memory.530* If 0, then data provided with the event are not531* accepted. */532533unsigned int line_number_size; /**<\brief The number of entries in the line number534* table. 0 if none. */535536pLineNumberInfo line_number_table; /**<\brief Pointer to the line numbers info537* array. Can be NULL if538* line_number_size is 0. See539* LineNumberInfo Structure for a540* description of a single entry in541* the line number info array */542543char* class_file_name; /**<\brief Class name. Can be NULL.*/544545char* source_file_name; /**<\brief Source file name. Can be NULL.*/546547} *piJIT_Method_Inline_Load, iJIT_Method_Inline_Load;548549/** @cond exclude_from_documentation */550/**551* @brief Description of a segment type552* @details Use the segment type to specify a type of data supplied553* with the iJVM_EVENT_TYPE_METHOD_UPDATE_V2 event to be applied to554* a certain code trace.555*/556typedef enum _iJIT_SegmentType557{558iJIT_CT_UNKNOWN = 0,559560iJIT_CT_CODE, /**<\brief Executable code. */561562iJIT_CT_DATA, /**<\brief Data (not executable code).563* VTune Amplifier uses the format string564* (see iJIT_Method_Update) to represent565* this data in the VTune Amplifier GUI */566567iJIT_CT_KEEP, /**<\brief Use the previous markup for the trace.568* Can be used for the following569* iJVM_EVENT_TYPE_METHOD_UPDATE_V2 events,570* if the type of the previously reported segment571* type is the same. */572iJIT_CT_EOF573} iJIT_SegmentType;574575/**576* @brief Description of a dynamic update of the content within JIT-compiled method577* @details The JIT engine may generate the methods that are updated at runtime578* partially by mixed (data + executable code) content. When you use the iJIT_Method_Update579* structure to describe the update of the content within a JIT-compiled method,580* use iJVM_EVENT_TYPE_METHOD_UPDATE_V2 as an event type to report it.581*582* On the first Update event, VTune Amplifier copies the original code range reported by583* the iJVM_EVENT_TYPE_METHOD_LOAD event, then modifies it with the supplied bytes and584* adds the modified range to the original method. For next update events, VTune Amplifier585* does the same but it uses the latest modified version of a code region for update.586* Eventually, VTune Amplifier GUI displays multiple code ranges for the method reported by587* the iJVM_EVENT_TYPE_METHOD_LOAD event.588* Notes:589* - Multiple update events with different types for the same trace are allowed590* but they must be reported for the same code ranges.591* Example,592* @code593* [-- data---] Allowed594* [-- code --] Allowed595* [code] Ignored596* [-- data---] Allowed597* [-- code --] Allowed598* [------------ trace ---------]599* @endcode600* - The types of previously reported events can be changed but they must be reported601* for the same code ranges.602* Example,603* @code604* [-- data---] Allowed605* [-- code --] Allowed606* [-- data---] Allowed607* [-- code --] Allowed608* [------------ trace ---------]609* @endcode610*/611612typedef struct _iJIT_Method_Update613{614void* load_address; /**<\brief Start address of the update within a method */615616unsigned int size; /**<\brief The update size */617618iJIT_SegmentType type; /**<\brief Type of the update */619620const char* data_format; /**<\brief C string that contains a format string621* that follows the same specifications as format in printf.622* The format string is used for iJIT_CT_CODE only623* and cannot be NULL.624* Format can be changed on the fly. */625} *piJIT_Method_Update, iJIT_Method_Update;626627/** @endcond */628629#pragma pack(pop)630631/** @cond exclude_from_documentation */632#ifdef __cplusplus633extern "C" {634#endif /* __cplusplus */635636#ifndef JITAPI_CDECL637# if defined WIN32 || defined _WIN32638# define JITAPI_CDECL __cdecl639# else /* defined WIN32 || defined _WIN32 */640# if defined _M_IX86 || defined __i386__641# define JITAPI_CDECL __attribute__ ((cdecl))642# else /* _M_IX86 || __i386__ */643# define JITAPI_CDECL /* actual only on x86_64 platform */644# endif /* _M_IX86 || __i386__ */645# endif /* defined WIN32 || defined _WIN32 */646#endif /* JITAPI_CDECL */647648#define JITAPI JITAPI_CDECL649/** @endcond */650651/**652* @brief Generates a new unique method ID.653*654* You must use this API to obtain unique and valid method IDs for methods or655* traces reported to the agent if you don't have your own mechanism to generate656* unique method IDs.657*658* @return a new unique method ID. When out of unique method IDs, this API659* returns 0, which is not an accepted value.660*/661unsigned int JITAPI iJIT_GetNewMethodID(void);662663/**664* @brief Returns the current mode of the agent.665*666* @return iJIT_SAMPLING_ON, indicating that agent is running, or667* iJIT_NOTHING_RUNNING if no agent is running.668*/669iJIT_IsProfilingActiveFlags JITAPI iJIT_IsProfilingActive(void);670671/**672* @brief Reports infomation about JIT-compiled code to the agent.673*674* The reported information is used to attribute samples obtained from any675* Intel(R) VTune(TM) Amplifier collector. This API needs to be called676* after JIT compilation and before the first entry into the JIT-compiled677* code.678*679* @param[in] event_type - type of the data sent to the agent680* @param[in] EventSpecificData - pointer to event-specific data681*682* @returns 1 on success, otherwise 0.683*/684int JITAPI iJIT_NotifyEvent(iJIT_JVM_EVENT event_type, void *EventSpecificData);685686#ifdef __cplusplus687}688#endif /* __cplusplus */689/** @endcond */690691/** @} jitapi group */692693#endif /* __JITPROFILING_H__ */694695696