| Index: src/third_party/vtune/jitprofiling.cc
|
| diff --git a/src/third_party/vtune/jitprofiling.cc b/src/third_party/vtune/jitprofiling.cc
|
| index 40282903fcabe1ddbf1e370a003f2c82a80881e7..b3952b32169b1825f068173d89d64bf0f131420c 100644
|
| --- a/src/third_party/vtune/jitprofiling.cc
|
| +++ b/src/third_party/vtune/jitprofiling.cc
|
| @@ -103,12 +103,12 @@ static iJIT_IsProfilingActiveFlags executionMode = iJIT_NOTHING_RUNNING;
|
|
|
| /* end collector dll part. */
|
|
|
| -/* loadiJIT_Funcs() : this function is called just in the beginning and is responsible
|
| +/* loadiJIT_Funcs() : this function is called just in the beginning and is responsible
|
| ** to load the functions from BistroJavaCollector.dll
|
| ** result:
|
| ** on success: the functions loads, iJIT_DLL_is_missing=0, return value = 1.
|
| ** on failure: the functions are NULL, iJIT_DLL_is_missing=1, return value = 0.
|
| -*/
|
| +*/
|
| static int loadiJIT_Funcs(void);
|
|
|
| /* global representing whether the BistroJavaCollector can't be loaded */
|
| @@ -129,7 +129,7 @@ static pthread_key_t threadLocalStorageHandle = (pthread_key_t)0;
|
|
|
| #define INIT_TOP_Stack 10000
|
|
|
| -typedef struct
|
| +typedef struct
|
| {
|
| unsigned int TopStack;
|
| unsigned int CurrentStack;
|
| @@ -139,9 +139,9 @@ typedef struct
|
|
|
| /*
|
| ** The function for reporting virtual-machine related events to VTune.
|
| -** Note: when reporting iJVM_EVENT_TYPE_ENTER_NIDS, there is no need to fill in the stack_id
|
| +** Note: when reporting iJVM_EVENT_TYPE_ENTER_NIDS, there is no need to fill in the stack_id
|
| ** field in the iJIT_Method_NIDS structure, as VTune fills it.
|
| -**
|
| +**
|
| ** The return value in iJVM_EVENT_TYPE_ENTER_NIDS && iJVM_EVENT_TYPE_LEAVE_NIDS events
|
| ** will be 0 in case of failure.
|
| ** in iJVM_EVENT_TYPE_METHOD_LOAD_FINISHED event it will be -1 if EventSpecificData == 0
|
| @@ -153,7 +153,7 @@ ITT_EXTERN_C int JITAPI iJIT_NotifyEvent(iJIT_JVM_EVENT event_type, void *EventS
|
| int ReturnValue;
|
|
|
| /*******************************************************************************
|
| - ** This section is for debugging outside of VTune.
|
| + ** This section is for debugging outside of VTune.
|
| ** It creates the environment variables that indicates call graph mode.
|
| ** If running outside of VTune remove the remark.
|
| **
|
| @@ -170,22 +170,22 @@ ITT_EXTERN_C int JITAPI iJIT_NotifyEvent(iJIT_JVM_EVENT event_type, void *EventS
|
| *******************************************************************************/
|
|
|
| /* initialization part - the functions have not been loaded yet. This part
|
| - ** will load the functions, and check if we are in Call Graph mode.
|
| + ** will load the functions, and check if we are in Call Graph mode.
|
| ** (for special treatment).
|
| */
|
| - if (!FUNC_NotifyEvent)
|
| + if (!FUNC_NotifyEvent)
|
| {
|
| - if (iJIT_DLL_is_missing)
|
| + if (iJIT_DLL_is_missing)
|
| return 0;
|
|
|
| // load the Function from the DLL
|
| - if (!loadiJIT_Funcs())
|
| + if (!loadiJIT_Funcs())
|
| return 0;
|
|
|
| /* Call Graph initialization. */
|
| }
|
|
|
| - /* If the event is method entry/exit, check that in the current mode
|
| + /* If the event is method entry/exit, check that in the current mode
|
| ** VTune is allowed to receive it
|
| */
|
| if ((event_type == iJVM_EVENT_TYPE_ENTER_NIDS || event_type == iJVM_EVENT_TYPE_LEAVE_NIDS) &&
|
| @@ -194,7 +194,7 @@ ITT_EXTERN_C int JITAPI iJIT_NotifyEvent(iJIT_JVM_EVENT event_type, void *EventS
|
| return 0;
|
| }
|
| /* This section is performed when method enter event occurs.
|
| - ** It updates the virtual stack, or creates it if this is the first
|
| + ** It updates the virtual stack, or creates it if this is the first
|
| ** method entry in the thread. The stack pointer is decreased.
|
| */
|
| if (event_type == iJVM_EVENT_TYPE_ENTER_NIDS)
|
| @@ -263,7 +263,7 @@ ITT_EXTERN_C int JITAPI iJIT_NotifyEvent(iJIT_JVM_EVENT event_type, void *EventS
|
| return 0;
|
| }
|
|
|
| - ReturnValue = (int)FUNC_NotifyEvent(event_type, EventSpecificData);
|
| + ReturnValue = (int)FUNC_NotifyEvent(event_type, EventSpecificData);
|
|
|
| return ReturnValue;
|
| }
|
| @@ -296,7 +296,7 @@ ITT_EXTERN_C iJIT_IsProfilingActiveFlags JITAPI iJIT_IsProfilingActive()
|
| /* this function loads the collector dll (BistroJavaCollector) and the relevant functions.
|
| ** on success: all functions load, iJIT_DLL_is_missing = 0, return value = 1.
|
| ** on failure: all functions are NULL, iJIT_DLL_is_missing = 1, return value = 0.
|
| -*/
|
| +*/
|
| static int loadiJIT_Funcs()
|
| {
|
| static int bDllWasLoaded = 0;
|
| @@ -314,7 +314,7 @@ static int loadiJIT_Funcs()
|
| iJIT_DLL_is_missing = 1;
|
| FUNC_NotifyEvent = NULL;
|
|
|
| - if (m_libHandle)
|
| + if (m_libHandle)
|
| {
|
| #if ITT_PLATFORM==ITT_PLATFORM_WIN
|
| FreeLibrary(m_libHandle);
|
| @@ -390,7 +390,7 @@ static int loadiJIT_Funcs()
|
| #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */
|
| FUNC_NotifyEvent = reinterpret_cast<TPNotify>(reinterpret_cast<intptr_t>(dlsym(m_libHandle, "NotifyEvent")));
|
| #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */
|
| - if (!FUNC_NotifyEvent)
|
| + if (!FUNC_NotifyEvent)
|
| {
|
| FUNC_Initialize = NULL;
|
| return 0;
|
| @@ -401,7 +401,7 @@ static int loadiJIT_Funcs()
|
| #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */
|
| FUNC_Initialize = reinterpret_cast<TPInitialize>(reinterpret_cast<intptr_t>(dlsym(m_libHandle, "Initialize")));
|
| #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */
|
| - if (!FUNC_Initialize)
|
| + if (!FUNC_Initialize)
|
| {
|
| FUNC_NotifyEvent = NULL;
|
| return 0;
|
| @@ -433,7 +433,7 @@ static int loadiJIT_Funcs()
|
| }
|
|
|
| /*
|
| -** This function should be called by the user whenever a thread ends, to free the thread
|
| +** This function should be called by the user whenever a thread ends, to free the thread
|
| ** "virtual stack" storage
|
| */
|
| ITT_EXTERN_C void JITAPI FinalizeThread()
|
| @@ -464,7 +464,7 @@ ITT_EXTERN_C void JITAPI FinalizeThread()
|
| */
|
| ITT_EXTERN_C void JITAPI FinalizeProcess()
|
| {
|
| - if (m_libHandle)
|
| + if (m_libHandle)
|
| {
|
| #if ITT_PLATFORM==ITT_PLATFORM_WIN
|
| FreeLibrary(m_libHandle);
|
| @@ -484,7 +484,7 @@ ITT_EXTERN_C void JITAPI FinalizeProcess()
|
|
|
| /*
|
| ** This function should be called by the user for any method once.
|
| -** The function will return a unique method ID, the user should maintain the ID for each
|
| +** The function will return a unique method ID, the user should maintain the ID for each
|
| ** method
|
| */
|
| ITT_EXTERN_C unsigned int JITAPI iJIT_GetNewMethodID()
|
|
|