< prev index next >
src/share/vm/oops/oopsHierarchy.cpp
Print this page
@@ -33,11 +33,11 @@
void oop::register_oop() {
assert (CheckUnhandledOops, "should only call when CheckUnhandledOops");
if (!Universe::is_fully_initialized()) return;
// This gets expensive, which is why checking unhandled oops is on a switch.
- Thread* t = ThreadLocalStorage::thread();
+ Thread* t = Thread::current_or_null();
if (t != NULL && t->is_Java_thread()) {
frame fr = os::current_frame();
// This points to the oop creator, I guess current frame points to caller
assert (fr.pc(), "should point to a vm frame");
t->unhandled_oops()->register_unhandled_oop(this, fr.pc());
@@ -46,11 +46,11 @@
void oop::unregister_oop() {
assert (CheckUnhandledOops, "should only call when CheckUnhandledOops");
if (!Universe::is_fully_initialized()) return;
// This gets expensive, which is why checking unhandled oops is on a switch.
- Thread* t = ThreadLocalStorage::thread();
+ Thread* t = Thread::current_or_null();
if (t != NULL && t->is_Java_thread()) {
t->unhandled_oops()->unregister_unhandled_oop(this);
}
}
#endif // CHECK_UNHANDLED_OOPS
< prev index next >