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

Report final field modification by calling runtime helper #4514

Merged
merged 2 commits into from
Feb 7, 2019

Conversation

liqunl
Copy link
Contributor

@liqunl liqunl commented Jan 30, 2019

Keeping the Unsafe call as the slow path is suboptimal compared to using
the runtime helper.

  • Unsafe call consumes more arguments, which means more registers.
  • Unsafe call has more use and def aliases and not transparent to the
    optimizer.
  • For Unsafe call that returns a result, a temp has to be created to
    store result from the fast path and from the slow path.

Therefore, report the ilegal modification through the runtime helper
jitReportFinalFieldModified.

Also Enable the illegal write notification in this PR.

closes: #4385

Signed-off-by: Liqun Liu liqunl@ca.ibm.com

@liqunl
Copy link
Contributor Author

liqunl commented Jan 30, 2019

Depends on eclipse-omr/omr#3523 and eclipse-omr/omr#3528.
WIP this PR, will add a commit to enable notification once perf evaluation is done.

@liqunl liqunl changed the title Report final field modification by calling runtime helper WIP: Report final field modification by calling runtime helper Jan 30, 2019
Keeping the Unsafe call as the slow path is suboptimal compared to using
the runtime helper.
- Unsafe call consumes more arguments, which means more registers.
- Unsafe call has more use and def aliases and not transparent to the
  optimizer.
- For Unsafe call that returns a result, a temp has to be created to
  store result from the fast path and from the slow path.
- Allow Unsafe calls in cold blocks to be optimized since the
  transformation no longer duplicate Unsafe calls to a cold block.

Therefore, report the ilegal modification through the runtime helper
jitReportFinalFieldModified.

Signed-off-by: Liqun Liu <liqunl@ca.ibm.com>
@liqunl liqunl changed the title WIP: Report final field modification by calling runtime helper Report final field modification by calling runtime helper Feb 6, 2019
@liqunl
Copy link
Contributor Author

liqunl commented Feb 6, 2019

Performance comparison between proposed change and baseline. Positive number means better than baseline, negative number means worse than baseline.

The performance difference between the proposed change and the baseline is within the noise margin for the following benchmarks.

Benchmark Relative perf Standard deviation
daytrader3 +0.02% 0.38%
AcmeAir -0.32% 0.8%
ILOG 300RuleSet +0.11% 3.65%
ILOG 5Path -0.15% 1.43%
Pagerank -0.45% 1.34%
Sort +0.01% 2.07%
Terasort +0.08% 1.15%
Wordcount +0.4% 1.55%

@liqunl
Copy link
Contributor Author

liqunl commented Feb 6, 2019

@andrewcraik Could you review?

@andrewcraik
Copy link
Contributor

Have you looked at any startup metrics to see what impact the compiel-time has on them specifically? I suspect it should be fine since HiBench is ok but an explicit measure would be good. Actual changes look ok to me.

@liqunl
Copy link
Contributor Author

liqunl commented Feb 6, 2019

@andrewcraik Yes, looked at liberty start up sufpdt7, there is no regression.

Benchmark Relative perf Standard deviation
sufpdt7 +0.04% 1.4%

closes: eclipse-openj9#4385

Signed-off-by: Liqun Liu <liqunl@ca.ibm.com>
@andrewcraik
Copy link
Contributor

Jenkins test sanity xlinux,win,plinux jdk8,jdk11

@andrewcraik
Copy link
Contributor

@mpirvu any object to turning this on again? @liqunl has fixed the regressions and the data looks good. If any perf issues surface again we'll have a look for sure, but I think this should be good to go now.

@mpirvu
Copy link
Contributor

mpirvu commented Feb 7, 2019

If start-up regressions have been eliminated I am ok with the change.

@liqunl
Copy link
Contributor Author

liqunl commented Feb 7, 2019

@mpirvu Yes, the start up is verified on sufpdt7, a liberty DT7 benchmark.

@andrewcraik andrewcraik merged commit 9a667d4 into eclipse-openj9:master Feb 7, 2019
@liqunl liqunl deleted the illegalwrite branch January 17, 2020 15:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enable Unsafe illegal write notification
3 participants