Git Product home page Git Product logo

Comments (3)

ekovanova avatar ekovanova commented on August 28, 2024

@iamkroot, we use iJitIttNotifyInfo functionality only for testing purposes in the llvm-jitlistener tool.

To create an Intel JIT event listener for the llvm-jitlistener we provide it with the IttnotifyInfo function
in llvm/tools/llvm-jitlistener/llvm-jitlistener.cpp

image

Could you please describe how you would you like to use these listeners?
Theoretically, we could link the functionality of this LLVM listener with __itt_module_load_with_sections and __itt_module_unload_with_sections ITT APIs

from ittapi.

iamkroot avatar iamkroot commented on August 28, 2024

Could you please describe how you would you like to use these listeners?

I have a JIT-ted program running through LLVM's MCJIT ExecutionEngine. I want to profile this using VTune (great software!), but my code is heavily inlined.

From reading the LLVM PR, I assumed that this was something that we could handle out-of-the-box using IntelJITEventListener. But as you mentioned, the iJitIttNotifyInfo is only used for debugging/dumping the ELF and is not calling anything on the VTune/ittnotify side in the default listener.

Theoretically, we could link the functionality of this LLVM listener with __itt_module_load_with_sections and __itt_module_unload_with_sections ITT APIs

Would that handle inlined functions? I also see iJVM_EVENT_TYPE_METHOD_INLINE_LOAD_FINISHED inside jitprofiling.c, and was planning to use that instead.

from ittapi.

ekovanova avatar ekovanova commented on August 28, 2024

I have a JIT-ted program running through LLVM's MCJIT ExecutionEngine. I want to profile this using VTune (great software!), but my code is heavily inlined.

Well, since your JIT-ted program running through LLVM's MCJIT ExecutionEngine you just need to make sure that it was compiled with DLLVM_USE_INTEL_JITEVENTS=ON option. LLVM's MCJIT already has VTune profiling support and you do not need to make changes in LLVM project.

From reading the LLVM PR, I assumed that this was something that we could handle out-of-the-box using IntelJITEventListener. But as you mentioned, the iJitIttNotifyInfo is only used for debugging/dumping the ELF and is not calling anything on the VTune/ittnotify side in the default listener.

MCJIT already instrumented with ITT API __itt_module_load_with_sections which dumps ELF file and provides VTune with all the necessary information during profiling.
In this case inlines are not a problem :)
And you do not need the iJitIttNotifyInfo functionality, we have it only for testing purposes in the llvm-jitlistener tool.

Also I would like to note, that in case of VTune attach to a launched application, we recommend to manually set INTEL_LIBITTNOTIFY64 (and INTEL_LIBITTNOTIFY32 for 32 bit) environment variable before launching the application.

@iamkroot sorry for the delayed reply, I was on a vacation.

from ittapi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.