JDK-8261520: JDK-8261302 breaks runtime/NMT/CheckForProperDetailStackTrace.java #2672
Since JDK-8261302, the test runtime/NMT/CheckForProperDetailStackTrace.java fails with
This prediction was now off since the hash code calculation happened at the end of the callstack. This causes the test error, since on some platforms (eg Linux x64) we now think we have a tail call when we don't, which means we do not skip enough frames, and the NMT output contains call frames like "NativeCallStack::NativeCallStack()", which trips the test.
This fix moves the hash code calculation completely out of NativeCallStack. There is no reason why NativeCallStack should have a hash code. It mainly exists as a convenience to place it in a hash map. The patch moves the hash code calculation up into MallocSiteTableEntry.
This has the advantage of only having to pay for a hash code when you need it - in theory, one may use NativeCallStack in places other than NMT, where it is unnecessary.
I considered other options:
Tests: GA, manual test, nightlies at SAP
The text was updated successfully, but these errors were encountered:
@tstuefe This change now passes all automated pre-integration checks.
After integration, the commit message for the final commit will be:
At the time when this comment was updated there had been 18 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.
Yes, I do too. Also, I had some vague thoughts once about using it in UL to provide callstacks at log sites (was actually Robins idea).
@tstuefe Since your change was applied there have been 20 commits pushed to the
Your commit was automatically rebased without conflicts.
Pushed as commit 722142e.