RFR: Add Handle arguments and fix OopHandle

Coleen Phillimore coleenp at openjdk.java.net
Mon Jul 26 15:25:49 UTC 2021


I changed two things in this PR.  Passing oop to a function then having to make it a Handle later is a recipe for naked oop bugs, so I made JvmtiThreadState::state_for pass a Handle. We try to handle-ize oops earlier in the call stack.  I made state_for_while_locked() take an oop however and added a NSV because it doesn't safepoint, and some callers only had oops, not handles.

I changed the suspend_list, resume_list to use JvmtiExport::jvmti_oop_storage rather than vm_globals().  Also rewrote some strange looking OopHandle code.  Moving handles in the GrowableArray does require Nulling them out, but not while creating them.

Tested with mach5 --patch-based --extra-src-dirs /scratch/coleen/hg/loom -j loom-tier1,loom-tier2

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

Commit messages:
 - move a thread::current
 - Add Handle arguments and fix OopHandle

Changes: https://git.openjdk.java.net/loom/pull/55/files
 Webrev: https://webrevs.openjdk.java.net/?repo=loom&pr=55&range=00
  Stats: 55 lines in 4 files changed: 17 ins; 10 del; 28 mod
  Patch: https://git.openjdk.java.net/loom/pull/55.diff
  Fetch: git fetch https://git.openjdk.java.net/loom pull/55/head:pull/55

PR: https://git.openjdk.java.net/loom/pull/55


More information about the loom-dev mailing list