Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code to periodically track IProfiler overhead #20898

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mpirvu
Copy link
Contributor

@mpirvu mpirvu commented Jan 9, 2025

Every 5 seconds we will print the number of profiling entries, the CPU taken by the IProfiler thread and the top 5 methods that received profiling samples.
The code is not active to minimize overhead. In order to compile it in one needs to define TRACK_SAMPLE_SOURCES Also, to activate it at runtime, one needs to define the following env var: TR_TrackIProfilerActivity

@mpirvu mpirvu added the comp:jit label Jan 9, 2025
@mpirvu mpirvu requested a review from dsouzai as a code owner January 9, 2025 17:03
@mpirvu mpirvu marked this pull request as draft January 9, 2025 17:04
@mpirvu
Copy link
Contributor Author

mpirvu commented Jan 9, 2025

jenkins compile all jdk8,jdk23

@mpirvu
Copy link
Contributor Author

mpirvu commented Jan 9, 2025

build failures on mac likely because is not included:

12:17:25  /Applications/Xcode_12.4.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/utility:306:9: error: implicit instantiation of undefined template 'std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >'
12:17:25      _T2 second;
12:17:25          ^
12:17:25  /Applications/Xcode_12.4.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/unordered_map:638:16: note: in instantiation of template class 'std::__1::pair<const J9ROMMethod *const, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >' requested here
12:17:25      value_type __cc;
12:17:25                 ^
12:17:25  /Users/jenkins/workspace/Build_JDK23_x86-64_mac_Personal/openj9/runtime/compiler/runtime/IProfiler.cpp:4187:55: note: in instantiation of template class 'std::__1::__hash_value_type<const J9ROMMethod *, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >' requested here
12:17:25        const std::string methodName = (methodEntryIter != methodNames.end()) ? methodEntryIter->second : "";

@mpirvu mpirvu force-pushed the iprofilerinstrumentation branch from 991a9c4 to 2f7ab74 Compare January 9, 2025 19:41
@mpirvu
Copy link
Contributor Author

mpirvu commented Jan 9, 2025

jenkins compile aix,amac jdk8,jdk23

@mpirvu
Copy link
Contributor Author

mpirvu commented Jan 9, 2025

jenkins compile zlinux jdk8

@mpirvu mpirvu force-pushed the iprofilerinstrumentation branch from 2f7ab74 to 9bd3312 Compare January 10, 2025 00:01
@mpirvu
Copy link
Contributor Author

mpirvu commented Jan 10, 2025

jenkins compile aix,amac,zlinux jdk8,jdk23

@mpirvu mpirvu force-pushed the iprofilerinstrumentation branch from 9bd3312 to 06bd0eb Compare January 10, 2025 23:33
Every 5 seconds we will print the number of profiling entries,
the CPU taken by the IProfiler thread and the top 5 methods
that received profiling samples.
The code is not active, to minimize overhead. In order to
compile it in one needs to define `TRACK_SAMPLE_SOURCES`
Also, to activate it at runtime, one needs to define the
following env var: `TR_TrackIProfilerActivity`
The information appears in the verbose log if one is defined
or to stderr if there is no vlog.

Signed-off-by: Marius Pirvu <[email protected]>
@mpirvu mpirvu force-pushed the iprofilerinstrumentation branch from 06bd0eb to 15b5abe Compare January 11, 2025 03:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant