Analyzers
Talk to fellow users of Intel Analyzer tools (Intel VTune™ Profiler, Intel Advisor)

JIT API and profiling a running process

Alex_K_1
Beginner
712 Views

Hi,

We use the JIT Profiling API to be able to see dynamically generated code in the profile. This works well when the process is started by VTune. However, it does not work for an already running process, e.g., with the --target-pid argument.

It appears that iJIT_IsProfilingActive() returns iJIT_NOTHING_RUNNING in that case. I am sure that this function was called after the profiler has attached to the process. 

Is it a supported scenario use the JIT profiling API for attached processes? Thanks.

0 Kudos
2 Replies
Jennifer_D_Intel
Moderator
712 Views

Hello,

Have you tried setting the INTEL_LIBITTNOTIFY64 environment variable to the location of libittnotify_collector.so before launching the application?  More information here:
https://software.intel.com/en-us/node/544198

Regards,
Jennifer

0 Kudos
Alex_K_1
Beginner
712 Views

Hi Jennifer,

Setting INTEL_LIBITNOTIFY64 did not help.

 However, this led me to looking into other variables that VTune sets in the launched application and I found that setting INTEL_JIT_PROFILER64 actually makes the JIT interface to work on an attached process!

I will do some additional testing, but it seems to work on a simple application, at least.

Thanks!

0 Kudos
Reply