LLVM 22.0.0git
jitprofiling.c File Reference
#include "ittnotify_config.h"
#include <windows.h>
#include <stdlib.h>
#include "jitprofiling.h"

Go to the source code of this file.

Classes

struct  ThreadStack

Macros

#define DLL_ENVIRONMENT_VAR   "VS_PROFILER"
#define NEW_DLL_ENVIRONMENT_VAR   "INTEL_JIT_PROFILER32"
#define DEFAULT_DLLNAME   "JitPI.dll"
#define ANDROID_JIT_AGENT_PATH   "/data/intel/libittnotify.so"
#define INIT_TOP_Stack   10000

Typedefs

typedef unsigned int(* TPInitialize) (void)
typedef unsigned int(* TPNotify) (unsigned int, void *)
typedef struct ThreadStackpThreadStack

Functions

static int loadiJIT_Funcs (void)
ITT_EXTERN_C int JITAPI iJIT_NotifyEvent (iJIT_JVM_EVENT event_type, void *EventSpecificData)
ITT_EXTERN_C void JITAPI iJIT_RegisterCallbackEx (void *userdata, iJIT_ModeChangedEx NewModeCallBackFuncEx)
ITT_EXTERN_C iJIT_IsProfilingActiveFlags JITAPI iJIT_IsProfilingActive (void)
ITT_EXTERN_C void JITAPI FinalizeThread (void)
ITT_EXTERN_C void JITAPI FinalizeProcess (void)
ITT_EXTERN_C unsigned int JITAPI iJIT_GetNewMethodID (void)

Variables

static const char rcsid [] = "\n@(#) $Revision: 243501 $\n"
HINSTANCE m_libHandle = NULL
static TPInitialize FUNC_Initialize =NULL
static TPNotify FUNC_NotifyEvent =NULL
static iJIT_IsProfilingActiveFlags executionMode = iJIT_NOTHING_RUNNING
static int iJIT_DLL_is_missing = 0
static DWORD threadLocalStorageHandle = 0

Macro Definition Documentation

◆ ANDROID_JIT_AGENT_PATH

#define ANDROID_JIT_AGENT_PATH   "/data/intel/libittnotify.so"

Definition at line 53 of file jitprofiling.c.

Referenced by loadiJIT_Funcs().

◆ DEFAULT_DLLNAME

#define DEFAULT_DLLNAME   "JitPI.dll"

Definition at line 45 of file jitprofiling.c.

Referenced by loadiJIT_Funcs().

◆ DLL_ENVIRONMENT_VAR

#define DLL_ENVIRONMENT_VAR   "VS_PROFILER"

Definition at line 34 of file jitprofiling.c.

Referenced by loadiJIT_Funcs().

◆ INIT_TOP_Stack

#define INIT_TOP_Stack   10000

Definition at line 91 of file jitprofiling.c.

Referenced by iJIT_NotifyEvent().

◆ NEW_DLL_ENVIRONMENT_VAR

#define NEW_DLL_ENVIRONMENT_VAR   "INTEL_JIT_PROFILER32"

Definition at line 38 of file jitprofiling.c.

Referenced by loadiJIT_Funcs().

Typedef Documentation

◆ pThreadStack

typedef struct ThreadStack * pThreadStack

◆ TPInitialize

typedef unsigned int(* TPInitialize) (void)

Definition at line 56 of file jitprofiling.c.

◆ TPNotify

typedef unsigned int(* TPNotify) (unsigned int, void *)

Definition at line 59 of file jitprofiling.c.

Function Documentation

◆ FinalizeProcess()

ITT_EXTERN_C void JITAPI FinalizeProcess ( void )

Definition at line 447 of file jitprofiling.c.

References ITT_EXTERN_C, JITAPI, m_libHandle, and threadLocalStorageHandle.

◆ FinalizeThread()

ITT_EXTERN_C void JITAPI FinalizeThread ( void )

Definition at line 419 of file jitprofiling.c.

References ITT_EXTERN_C, JITAPI, and threadLocalStorageHandle.

◆ iJIT_GetNewMethodID()

ITT_EXTERN_C unsigned int JITAPI iJIT_GetNewMethodID ( void )

Definition at line 472 of file jitprofiling.c.

References ITT_EXTERN_C, and JITAPI.

◆ iJIT_IsProfilingActive()

ITT_EXTERN_C iJIT_IsProfilingActiveFlags JITAPI iJIT_IsProfilingActive ( void )

Definition at line 261 of file jitprofiling.c.

References executionMode, iJIT_DLL_is_missing, ITT_EXTERN_C, JITAPI, and loadiJIT_Funcs().

◆ iJIT_NotifyEvent()

◆ iJIT_RegisterCallbackEx()

ITT_EXTERN_C void JITAPI iJIT_RegisterCallbackEx ( void * userdata,
iJIT_ModeChangedEx NewModeCallBackFuncEx )

Definition at line 243 of file jitprofiling.c.

References iJIT_DLL_is_missing, iJIT_NO_NOTIFICATIONS, and loadiJIT_Funcs().

◆ loadiJIT_Funcs()

Variable Documentation

◆ executionMode

◆ FUNC_Initialize

TPInitialize FUNC_Initialize =NULL
static

Definition at line 57 of file jitprofiling.c.

Referenced by loadiJIT_Funcs().

◆ FUNC_NotifyEvent

TPNotify FUNC_NotifyEvent =NULL
static

Definition at line 60 of file jitprofiling.c.

Referenced by iJIT_NotifyEvent(), and loadiJIT_Funcs().

◆ iJIT_DLL_is_missing

int iJIT_DLL_is_missing = 0
static

◆ m_libHandle

HINSTANCE m_libHandle = NULL

Definition at line 46 of file jitprofiling.c.

Referenced by FinalizeProcess(), and loadiJIT_Funcs().

◆ rcsid

const char rcsid[] = "\n@(#) $Revision: 243501 $\n"
static

Definition at line 32 of file jitprofiling.c.

Referenced by loadiJIT_Funcs().

◆ threadLocalStorageHandle

DWORD threadLocalStorageHandle = 0
static

Definition at line 86 of file jitprofiling.c.

Referenced by FinalizeProcess(), FinalizeThread(), iJIT_NotifyEvent(), and loadiJIT_Funcs().