Skip to content

Reduce the amount of fanin info collected by IProfiler - #20975

Merged
dsouzai merged 1 commit into
eclipse-openj9:masterfrom
mpirvu:faninfo-memreduction
Jan 21, 2025
Merged

dsouzai merged 1 commit into
eclipse-openj9:masterfrom
mpirvu:faninfo-memreduction

Conversation

@mpirvu

@mpirvu mpirvu commented Jan 20, 2025 •

Copy link
Copy Markdown
Contributor

The only consumer of the fanin info is the inliner. However, the inliner will ignore the fanin data for any method (callee) that is less than 50 bytecodes. Thus, it makes sense to avoid storing fanin info for such small methods.
With this change the number of entries stored by the fanin mechanism is reduced by about 72%. This is expected to reduce footprint somewhat and to reduce the overhead of the methodinfo hashtable which stores fanin info.
The threshold that decides what is consiredered a small method from the fanin mechanism point of view can be changed with -Xjit:iprofilerFaninMethodMinSize= option (default is 50 bytecodes)

@mpirvu
mpirvu requested a review from dsouzai as a code owner January 20, 2025 17:03
@mpirvu
mpirvu force-pushed the faninfo-memreduction branch from ef7953e to a876c48 Compare January 20, 2025 17:06
@mpirvu

mpirvu commented Jan 20, 2025

Copy link
Copy Markdown
Contributor Author

@dsouzai Please review/merge this PR. Thanks

@dsouzai dsouzai left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Overall LGTM; requested minor cleanup of MIN_FAN_IN_SIZE.

The only consumer of the fanin info is the inliner.
However, the inliner will ignore the fanin data
for any method (callee) that is less than 50 bytecodes.
Thus, it makes sense to avoid storing fanin info for
such small methods. With this change the number of
entries stored by the fanin mechanism is reduced
by about 72%. This is expected to reduce footprint
somewhat and to reduce the overhead of the
methodinfo hashtable which stores fanin info.
The threshold that decides what is considered a small
method from the fanin mechanism point of view can be
changed with `-Xjit:iprofilerFaninMethodMinSize=`
option (default is 50 bytecodes)

Signed-off-by: Marius Pirvu <mpirvu@ca.ibm.com>
@mpirvu
mpirvu force-pushed the faninfo-memreduction branch from a876c48 to 5b93a77 Compare January 20, 2025 18:36
@dsouzai

dsouzai commented Jan 20, 2025

Copy link
Copy Markdown
Contributor

jenkins test sanity.functional xlinux,plinux,zlinux jdk8,jdk21

@mpirvu

mpirvu commented Jan 20, 2025

Copy link
Copy Markdown
Contributor Author

All tests have passed. This PR is ready to be merged.

@dsouzai
dsouzai merged commit 63f23a3 into eclipse-openj9:master Jan 21, 2025
mpirvu added a commit to mpirvu/openj9 that referenced this pull request Jan 24, 2025
PR eclipse-openj9#20975 is known to cause some throughput regressions.
These regressions are caused by limiting the IProfiler
to collect fanin info only for methods larger than 50 bytecodes.
It turns out that the code in `isLargeCompiledMethod()` does
not refer to the size of the callee in the variable called
`bytecodeSize`. `bytecodeSize` is actually some computed value
which can be much bigger than the size of the callee.

This commit eliminates the code that restricts the fanin info
to the methods larger than 50 bytecodes, but leaves all the
other changes of PR eclipse-openj9#20975 intact.

Signed-off-by: Marius Pirvu <mpirvu@ca.ibm.com>
vijaysun-omr added a commit that referenced this pull request Jan 24, 2025
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