10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24
25 #include "precompiled.hpp"
26 #include "gc/shared/oopStorage.inline.hpp"
27 #include "logging/log.hpp"
28 #include "memory/iterator.hpp"
29 #include "oops/oop.inline.hpp"
30 #include "runtime/jniHandles.inline.hpp"
31 #include "runtime/mutexLocker.hpp"
32 #include "runtime/thread.inline.hpp"
33 #include "trace/traceMacros.hpp"
34 #include "utilities/align.hpp"
35 #include "utilities/debug.hpp"
36 #if INCLUDE_ALL_GCS
37 #include "gc/g1/g1BarrierSet.hpp"
38 #endif
39
40 OopStorage* JNIHandles::_global_handles = NULL;
41 OopStorage* JNIHandles::_weak_global_handles = NULL;
42
43
44 jobject JNIHandles::make_local(oop obj) {
45 if (obj == NULL) {
46 return NULL; // ignore null handles
47 } else {
48 Thread* thread = Thread::current();
49 assert(oopDesc::is_oop(obj), "not an oop");
|
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24
25 #include "precompiled.hpp"
26 #include "gc/shared/oopStorage.inline.hpp"
27 #include "logging/log.hpp"
28 #include "memory/iterator.hpp"
29 #include "oops/oop.inline.hpp"
30 #include "runtime/handles.inline.hpp"
31 #include "runtime/jniHandles.inline.hpp"
32 #include "runtime/mutexLocker.hpp"
33 #include "runtime/thread.inline.hpp"
34 #include "trace/traceMacros.hpp"
35 #include "utilities/align.hpp"
36 #include "utilities/debug.hpp"
37 #if INCLUDE_ALL_GCS
38 #include "gc/g1/g1BarrierSet.hpp"
39 #endif
40
41 OopStorage* JNIHandles::_global_handles = NULL;
42 OopStorage* JNIHandles::_weak_global_handles = NULL;
43
44
45 jobject JNIHandles::make_local(oop obj) {
46 if (obj == NULL) {
47 return NULL; // ignore null handles
48 } else {
49 Thread* thread = Thread::current();
50 assert(oopDesc::is_oop(obj), "not an oop");
|