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

Stats for IProfiler fanin data #20971

Merged
merged 1 commit into from
Jan 20, 2025
Merged

Conversation

mpirvu
Copy link
Contributor

@mpirvu mpirvu commented Jan 18, 2025

For diagnostics, IProfiler fanin data can be dumped at shutdown into a specified file.
This commit improves the formatting of the data that is dumped and adds a histogram about the number of callers for each tracked callee.

The following environment variables control the output:

  • TR_PrintIPFanInStats: enables the printing of fanin data at JVM shutdown time. Note that another way of enabling the printing of this data is to use -Xjit:iprofilerVerbose, provided TR_PrintMethodHashTableFileName is set
  • TR_PrintMethodHashTableFileName: sets the name of the file that the data will be dumped into. If this is not provided the dump will not occur.
  • TR_PrintMethodHashTableMethodNames: print method names as well. By default, method names are not printed to avoid potential crashes due to classes having been unloaded.

@mpirvu
Copy link
Contributor Author

mpirvu commented Jan 18, 2025

jenkins compile all jdk21

@mpirvu
Copy link
Contributor Author

mpirvu commented Jan 20, 2025

Builds have passed (except windows which does not have any machines to run on).
The code is inactive, so testing is not going to reveal anything.
@dsouzai Please review/merge. Thanks!

Copy link
Contributor

@dsouzai dsouzai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the

unsigned totalWeight = entry->_otherBucket.getWeight();

should be changed to be an explicit type.

Other than that, LGTM.

runtime/compiler/runtime/IProfiler.cpp Outdated Show resolved Hide resolved
For diagnostics, IProfiler fanin data can be
dumped at shutdown into a specified file.
This commit improves the formatting of the data
that is dumped and adds a histogram about the
number of callers for each tracked callee.

The following environment variables control the output:

- `TR_PrintIPFanInStats`: enables the printing of fanin
   data at JVM shutdown time. Note that another way of
   enabling the printing of this data is to use
   -Xjit:iprofilerVerbose, provided TR_PrintMethodHashTableFileName
   is set
- `TR_PrintMethodHashTableFileName`: sets the name of the file
   that the data will be dumped into. If this is not provided
   the dump will not occur.
- `TR_PrintMethodHashTableMethodNames`: print method names as well.
   By default, method names are not printed to avoid potential
   crashes due to classes having been unloaded.

Signed-off-by: Marius Pirvu <[email protected]>
@dsouzai
Copy link
Contributor

dsouzai commented Jan 20, 2025

jenkins compile xlinux jdk21

@mpirvu
Copy link
Contributor Author

mpirvu commented Jan 20, 2025

jenkins compile zlinux jdk17

@dsouzai dsouzai merged commit 0c0cfce into eclipse-openj9:master Jan 20, 2025
5 checks passed
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.

2 participants