cancel
Showing results for 
Search instead for 
Did you mean: 

Server Gurus Discussions

patrulek
Adept I

AMDuProf - profiling JIT compiled function

Hello. I want to profile dynamically generated code (function that is JIT compiled during program execution), but i see no metrics for such piece of code. Is there any possibility to view those metrics or do i need to extract this code manually to another project and make the code static?

I would be fine just with address of the function entry and metrics (no need to view metrics to single instructions), eg.

Functions| Metric1 | Metric2 ...

0x0021248000    | Value1   | Value2 ...

...

0 Likes
1 Solution

Hi @patrulek 

Thank you for the clarification.
Currently AMDuProf does not support profiling of the JIT code of custom VMs.
AMDuProf supports VM/managed languages for - JVM, .NET.
We shall take this up as a feature request and keep you updated on the same.

View solution in original post

0 Likes
4 Replies
shrjoshi
Staff

Hi @patrulek 

Thank you for writing to Server Guru forum.
Can you please elaborate if this issue is about Java Language? For JAVA on Windows and Linux, AMDuProf supports to show the samples of the JIT methods. Please refer section 7.6 from User Guide. Let us know if you need any help to profile JAVA application. 

0 Likes
payyourcell
Journeyman III

  1. Code Profiling: AMDuProf can profile code execution to help identify hotspots and areas of optimization in your application. It can provide insights into CPU utilization, cache behavior, and other performance-related metrics.

  2. JIT Compilation Profiling: When dealing with JIT-compiled code, such as that generated by Just-In-Time compilers in languages like Java, .NET, or JavaScript engines, AMDuProf can profile the performance of the JIT-compiled functions. This can help you understand how efficiently your code is being compiled and executed.

  3. Instrumentation: AMDuProf can instrument your code to collect profiling data, which can then be analyzed to pinpoint performance issues.

  4. Call-Stack Profiling: It can provide call-stack information to help you understand the context in which performance issues are occurring.

  5. Integration with Other Tools: AMDuProf can work alongside other performance analysis and debugging tools, enhancing your ability to diagnose and resolve performance problems.

To use AMDuProf effectively, you typically need to:

  1. Install AMDuProf: Download and install AMDuProf on your development system. Ensure that it is compatible with your AMD processor and the operating system you are using.

  2. Instrument Your Code: Depending on your programming language and development environment, you may need to configure your application to be instrumented by AMDuProf. This often involves adding specific compiler or runtime flags.

  3. Collect Profiling Data: Run your application while AMDuProf collects profiling data. This data can be extensive and may include information about function execution times, cache behavior, and more.

  4. Analyze the Data: After collecting data during application execution, you can use AMDuProf's analysis tools to interpret the data and identify areas for optimization.

  5. Optimize Your Code: Based on the insights gained from AMDuProf's profiling data, make code optimizations to improve your application's performance.

 
0 Likes
patrulek
Adept I

Its not about Java. I have a custom application-type VM implemented in C++ and i improved its performance by JIT-compiling to native code. Unfortunately i dont see compiled function in results.

Im using Windows with VirtualAlloc and VirtualProtect (with PAGE_EXECUTE_READ mode). Then im calling such generated function in my code.

0 Likes

Hi @patrulek 

Thank you for the clarification.
Currently AMDuProf does not support profiling of the JIT code of custom VMs.
AMDuProf supports VM/managed languages for - JVM, .NET.
We shall take this up as a feature request and keep you updated on the same.

0 Likes