1 /* 2 * Copyright (c) 2003, 2009, Oracle and/or its affiliates. All rights reserved. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * This code is free software; you can redistribute it and/or modify it 6 * under the terms of the GNU General Public License version 2 only, as 7 * published by the Free Software Foundation. 8 * 9 * This code is distributed in the hope that it will be useful, but WITHOUT 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 "incls/_precompiled.incl" 26 # include "incls/_jvmtiTagMap.cpp.incl" 27 28 // JvmtiTagHashmapEntry 29 // 30 // Each entry encapsulates a JNI weak reference to the tagged object 31 // and the tag value. In addition an entry includes a next pointer which 32 // is used to chain entries together. 33 34 class JvmtiTagHashmapEntry : public CHeapObj { 35 private: 36 friend class JvmtiTagMap; 37 38 jweak _object; // JNI weak ref to tagged object 39 jlong _tag; // the tag 40 JvmtiTagHashmapEntry* _next; // next on the list 41 42 inline void init(jweak object, jlong tag) { 43 _object = object; 44 _tag = tag; 45 _next = NULL; 46 } | 1 /* 2 * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * This code is free software; you can redistribute it and/or modify it 6 * under the terms of the GNU General Public License version 2 only, as 7 * published by the Free Software Foundation. 8 * 9 * This code is distributed in the hope that it will be useful, but WITHOUT 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 "classfile/symbolTable.hpp" 27 #include "classfile/systemDictionary.hpp" 28 #include "classfile/vmSymbols.hpp" 29 #include "jvmtifiles/jvmtiEnv.hpp" 30 #include "oops/objArrayKlass.hpp" 31 #include "oops/oop.inline2.hpp" 32 #include "prims/jvmtiEventController.hpp" 33 #include "prims/jvmtiEventController.inline.hpp" 34 #include "prims/jvmtiExport.hpp" 35 #include "prims/jvmtiImpl.hpp" 36 #include "prims/jvmtiTagMap.hpp" 37 #include "runtime/biasedLocking.hpp" 38 #include "runtime/javaCalls.hpp" 39 #include "runtime/jniHandles.hpp" 40 #include "runtime/mutex.hpp" 41 #include "runtime/mutexLocker.hpp" 42 #include "runtime/reflectionUtils.hpp" 43 #include "runtime/vframe.hpp" 44 #include "runtime/vmThread.hpp" 45 #include "runtime/vm_operations.hpp" 46 #include "services/serviceUtil.hpp" 47 #ifndef SERIALGC 48 #include "gc_implementation/parallelScavenge/parallelScavengeHeap.hpp" 49 #endif 50 51 // JvmtiTagHashmapEntry 52 // 53 // Each entry encapsulates a JNI weak reference to the tagged object 54 // and the tag value. In addition an entry includes a next pointer which 55 // is used to chain entries together. 56 57 class JvmtiTagHashmapEntry : public CHeapObj { 58 private: 59 friend class JvmtiTagMap; 60 61 jweak _object; // JNI weak ref to tagged object 62 jlong _tag; // the tag 63 JvmtiTagHashmapEntry* _next; // next on the list 64 65 inline void init(jweak object, jlong tag) { 66 _object = object; 67 _tag = tag; 68 _next = NULL; 69 } |