Skip to content

Always profile switches in interpreter profiler - #20342

Merged
dsouzai merged 1 commit into
eclipse-openj9:masterfrom
mpirvu:switchFreq
Oct 16, 2024
Merged

Always profile switches in interpreter profiler#20342
dsouzai merged 1 commit into
eclipse-openj9:masterfrom
mpirvu:switchFreq

Conversation

@mpirvu

@mpirvu mpirvu commented Oct 15, 2024

Copy link
Copy Markdown
Contributor

Before this commit, the interpreter profiler was not collecting data on switches during 'classLoadPhase'. This was done to reduce the overhead of interpreter profiler. However, we have seen cases where, for some methods compiled during 'classLoadPhase' there is no profiling data for some hot switches, making the compiler to infer the wrong block frequencies.
This commit always collects information for switches. We can afford to do so because:

  1. Typically switches are not that frequently executed compared to branches
  2. When using the shared class cache (SCC), IProfiler is turned off during start-up, relying on profiling info stored in SCC in the cold run.

Before this commit, the interpreter profiler was not collecting
data on switches during 'classLoadPhase'. This was done to reduce
the overhead of interpreter profiler. However, we have seen
cases where, for some methods compiled during 'classLoadPhase'
there is no profiling data for some hot switches, making the compiler
to infer the wrong block frequencies.
This commit always collects information for switches. We can afford
to do so because:
1. Typically switches are not that frequently executed compared to branches
2. When using the shared class cache (SCC), IProfiler is turned off during
   start-up, relying on profiling info stored in SCC in the cold run.

Signed-off-by: Marius Pirvu <mpirvu@ca.ibm.com>
@mpirvu
mpirvu requested a review from dsouzai as a code owner October 15, 2024 16:19
@mpirvu

mpirvu commented Oct 15, 2024

Copy link
Copy Markdown
Contributor Author

@dsouzai Could you please review/merge this simple PR? Thanks

@mpirvu

mpirvu commented Oct 15, 2024

Copy link
Copy Markdown
Contributor Author

jenkins test sanity xlinux jdk17

@dsouzai dsouzai self-assigned this Oct 15, 2024
@mpirvu

mpirvu commented Oct 15, 2024

Copy link
Copy Markdown
Contributor Author

Tests have passed

@dsouzai
dsouzai merged commit f915a55 into eclipse-openj9:master Oct 16, 2024
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