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

Allow allocationFence to be reenabled by Local Flush Elimination #16547

Merged

Conversation

hzongaro
Copy link
Member

Flow Sensitive Escape Analysis will mark an allocationFence with omitSync set to true if it was needed by a single allocation that ended up being stack allocated.

On a subsequent pass of Escape Analysis, Local Flush Elimination might decide an allocationFence is needed at the same spot for another object allocation. An assertion in TR_LocalFlushElimination::examineNode expects any existing allocationFence that it finds to have its omitSync set to false, which didn't account for the possibility that it might find one that had previously been disabled.

Fixed the problem by removing the assertion and allowing the allocationFence to be reactivated for the second object allocation.

Also added more information to some trace messages.

Flow Sensitive Escape Analysis will mark an allocationFence with
omitSync set to true if it was needed by a single allocation that ended
up being stack allocated.

On a subsequent pass of Escape Analysis, Local Flush Elimination might
decide an allocationFence is needed at the same spot for another object
allocation.  An assertion in TR_LocalFlushElimination::examineNode
expects any existing allocationFence that it finds to have its omitSync
set to false, which didn't account for the possibility that it might
find one that had previously been disabled.

Fixed the problem by removing the assertion and allowing the
allocationFence to be reactivated for the second object allocation.

Also added more information to some trace messages.

Signed-off-by:  Henry Zongaro <zongaro@ca.ibm.com>
@hzongaro
Copy link
Member Author

Kevin @klangman and Vijay @vijaysun-omr, may I ask you to review this change? I know Kevin has some thoughts about fixes for additional problems that still exist in the interaction between escape analysis and flush elimination. This change is really an interim fix to deal with the fatal assertion failure.

@vijaysun-omr
Copy link
Contributor

Jenkins test sanity all jdk8,jdk11,jdk19

@klangman
Copy link
Contributor

Looks good to me.

@vijaysun-omr vijaysun-omr merged commit acf3290 into eclipse-openj9:master Jan 13, 2023
@hzongaro hzongaro deleted the flush-elimination-assertion branch January 13, 2023 14:17
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.

None yet

3 participants