8132510: Replace ThreadLocalStorage with compiler/language-based thread-local variables

Used compiled-based TLS when available. Additional contributions by Thomas Stufe (AIX) and Andrew Haley (Aarch64)

Reviewed-by: stuefe, bdelsart, dcubed
This commit is contained in:
David Holmes 2015-12-04 04:06:37 -05:00
parent 8929fdddb8
commit 6e0ea9d21c
101 changed files with 449 additions and 1966 deletions

View file

@ -35,7 +35,7 @@ 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
@ -48,7 +48,7 @@ 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);
}