JDK-8150663 : JavaThread::pd_get_top_frame_for_profiling may fail if the PC is at arbitrary locations
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 9
  • Priority: P3
  • Status: Closed
  • Resolution: Not an Issue
  • Submitted: 2016-02-25
  • Updated: 2016-08-01
  • Resolved: 2016-08-01
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 9
9Resolved
Related Reports
Relates :  
Description
In the review of JDK-8145521, Dean raised the issue whether the profiler would fail if the PC happens to land on the trampoline (which lives in the CDS archive "MC" section)

http://mail.openjdk.java.net/pipermail/hotspot-runtime-dev/2016-February/018106.html

In general, it's not clear whether the profiler can handle cases when the PC lands in exotic locations, for all CPU/OS combinations.

This bug is filed so we can investigate the current implementation to see if anything needs to be fixed to make the profiler more robust.

Comments
This was filed to cover the investigation of the issue! It should not be closed. Perhaps changed to enhancement as no distinct bug has presently been identified.
01-08-2016

This doesn't identify a real issue at this time, file or re-open this once you have a reproducible issue.
01-08-2016

The fix for JDK-8145221 already has the following code in JavaThread::pd_get_top_frame(): #if INCLUDE_CDS if (UseSharedSpaces && MetaspaceShared::is_in_shared_region(addr.pc(), MetaspaceShared::md)) { // In the middle of a trampoline call. Bail out for safety. // This happens rarely so shouldn't affect profiling. return false; } #endif This covers the case where the PC lands in MetaspaceShared::md. However, we are not sure what would happen in the PC is at other more exotic locations.
16-06-2016