There was a long ago experiment to remove the default constructors for Handle to force passing THREAD argument where one was available, so that there weren't unnecessary calls to Thread::current().
Thread::current() showed up as #1 on a flat profile once. This is no longer true, and less true now that most of the metadata handles have been removed.
If you pass NULL to Handle() it doesn't call Thread::current() anyway or generate code to do so, so the CHECK_(nullHandle) mess can go away in favor of CHECK_NULL.
- duplicates
-
JDK-8155672 Remove instanceKlassHandles and KlassHandles
-
- Resolved
-