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

Minor enhancements for performance investigation of Escape Analysis #16638

Merged
merged 3 commits into from Feb 3, 2023

Conversation

hzongaro
Copy link
Member

This pull request contains two enhancements for investigation of the run time performance impact of Escape Analysis:

  1. Check the setting of the suppressEA option to decide whether a particular candidate for stack allocation should be prevented from being stack allocated. This can help test the effect on performance of individual opportunities for stack allocation.
  2. Added dynamic debug counters to gauge the number of contiguous and non-contiguous stack allocation opportunities that were found.

There are also a number of minor clean-up items:

  1. There are two findIgnoreableUses methods, one of which finds uses that can be ignored, the other which marks them as ignorable. Renamed the second to markUsesAsIgnorable for clarity. Also corrected the spelling of "ignorable."
  2. Fixed some trace code that printed the address of a Candidate object rather than the address of the TR::Node object associated with the Candidate - that is, the Candidate::_node field.
  3. Removed method checkAllNewsOnRHSInLoop which was only used under control of an environment variable. After three years, it is probably safe to remove it.

Depends on OMR pull request eclipse/omr#6872

This change implements several minor clean-up items for Escape Analysis:

1) The top-level findIgnoreableUses method looks for calls to
eaEscapeHelper and then calls a second method named findIgnoreableUses
to mark uses of candidates for stack allocation as ignorable.  However,
that second method doesn't actually find ignoreable uses, it just marks
them.  This change renames that second method to markUsesAsIgnorable
for clarity.  Also corrected the spelling of 'ignorable.'

2) Most trace code in Escape Analysis identifies a candidate for stack
allocation by the address of the TR::Node for the allocation, which is
stored in the _node field of a Candidate object.  In two cases, tracing
was printing the address of the Candidate object itself.

3) Removed check of environment variable that is used to disable
checking in loops for aliases of candidates for stack allocation, and
removed method checkAllNewsOnRHSInLoop that was used in that case.  The
code that it allows to be disabled has been in place for about three
years now, so it seems relatively safe.

Signed-off-by:  Henry Zongaro <zongaro@ca.ibm.com>
Added dynamic debug counters to gauge the number of contiguous and
non-contiguous stack allocation opportunities that were found.

Signed-off-by:  Henry Zongaro <zongaro@ca.ibm.com>
Check the setting of the suppressEA option to decide whether a
particular candidate for stack allocation should be prevented from
being stack allocated.  This can help test the effect on performance of
individual opportunities for stack allocation.

Signed-off-by:  Henry Zongaro <zongaro@ca.ibm.com>
@vijaysun-omr
Copy link
Contributor

vijaysun-omr commented Jan 31, 2023

I looked at the changes and they look fine to me. Maybe the title of this PR ought to be changed to WIP until the OMR prereq is merged ?

@vijaysun-omr vijaysun-omr self-assigned this Jan 31, 2023
@jdmpapin
Copy link
Contributor

jdmpapin commented Feb 1, 2023

Maybe the title of this PR ought to be changed to WIP

It's already a draft, which IMO is better than a WIP title prefix, at least because GitHub knows about it and actually blocks merging. I think we only ever had the WIP convention because draft PRs didn't exist yet.

@hzongaro hzongaro marked this pull request as ready for review February 2, 2023 17:20
@hzongaro
Copy link
Member Author

hzongaro commented Feb 2, 2023

@vijaysun-omr Vijay, this is ready for review now that eclipse/omr#6872 has been promoted.

@vijaysun-omr
Copy link
Contributor

Jenkins test sanity all jdk8,jdk11,jdk19

@vijaysun-omr vijaysun-omr merged commit dd00421 into eclipse-openj9:master Feb 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants