< prev index next >

src/os/solaris/vm/thread_solaris.inline.hpp

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. --- 1,7 ---- /* ! * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation.
*** 37,57 **** // ThreadLocalStorage::thread is warm -- it's called > 16K times in the same // period. Thread::current() now calls ThreadLocalStorage::thread() directly. // For SPARC, to avoid excessive register window spill-fill faults, // we aggressively inline these routines. ! inline Thread* ThreadLocalStorage::thread() { ! // don't use specialized code if +UseMallocOnly -- may confuse Purify et al. ! debug_only(if (UseMallocOnly) return get_thread_slow();); ! uintptr_t raw = pd_raw_thread_id(); ! int ix = pd_cache_index(raw); ! Thread* candidate = ThreadLocalStorage::_get_thread_cache[ix]; ! if (candidate->self_raw_id() == raw) { ! // hit ! return candidate; ! } else { ! return ThreadLocalStorage::get_thread_via_cache_slowly(raw, ix); ! } } #endif // OS_SOLARIS_VM_THREAD_SOLARIS_INLINE_HPP --- 37,50 ---- // ThreadLocalStorage::thread is warm -- it's called > 16K times in the same // period. Thread::current() now calls ThreadLocalStorage::thread() directly. // For SPARC, to avoid excessive register window spill-fill faults, // we aggressively inline these routines. ! inline void ThreadLocalStorage::set_thread(Thread* thread) { ! _thr_current = thread; ! } ! inline Thread* ThreadLocalStorage::thread() { ! return _thr_current; } #endif // OS_SOLARIS_VM_THREAD_SOLARIS_INLINE_HPP
< prev index next >