RFR: 8265218: trace_method_handle_stub fails to find calling frame on x86 [v2]

Vladimir Ivanov vlivanov at openjdk.java.net
Wed Apr 21 10:44:04 UTC 2021


> `trace_method_handle_stub` on x86 tries to dump the frame which initiated the tracing, but fails to find the proper frame when it is the immediate caller.  
> 
> The problem is `os::current_frame()` returns the caller (instead of the current frame as the name suggests) and then `os::get_sender_for_C_frame()` steps over one more frame. So, if there are no intermediate frames present, it steps over the desired frame.
> 
> Proposed fix is to start the search from the frame reported by `os::current_frame()`.
> 
> Testing:
> - [x] failing test
> - [x] hs-precheckin-comp,hs-tier1,hs-tier2 w/ `-Xlog:methodhandles=trace`

Vladimir Ivanov has updated the pull request incrementally with one additional commit since the last revision:

  Improve the comment

-------------

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/3554/files
  - new: https://git.openjdk.java.net/jdk/pull/3554/files/9f21b3bb..0d86a907

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=3554&range=01
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=3554&range=00-01

  Stats: 7 lines in 1 file changed: 6 ins; 0 del; 1 mod
  Patch: https://git.openjdk.java.net/jdk/pull/3554.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/3554/head:pull/3554

PR: https://git.openjdk.java.net/jdk/pull/3554


More information about the hotspot-runtime-dev mailing list