1 /*
2 * Copyright (c) 2003, 2013, 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 // JvmtiTagMap
26
27 #ifndef SHARE_VM_PRIMS_JVMTITAGMAP_HPP
28 #define SHARE_VM_PRIMS_JVMTITAGMAP_HPP
29
30 #include "gc_interface/collectedHeap.hpp"
31 #include "jvmtifiles/jvmti.h"
32 #include "jvmtifiles/jvmtiEnv.hpp"
33 #include "memory/allocation.hpp"
34 #include "memory/genCollectedHeap.hpp"
35 #include "memory/universe.hpp"
36
37 // forward references
38 class JvmtiTagHashmap;
39 class JvmtiTagHashmapEntry;
40 class JvmtiTagHashmapEntryClosure;
41
42 class JvmtiTagMap : public CHeapObj<mtInternal> {
43 private:
44
45 enum{
46 max_free_entries = 4096 // maximum number of free entries per env
47 };
48
49 JvmtiEnv* _env; // the jvmti environment
50 Mutex _lock; // lock for this tag map
51 JvmtiTagHashmap* _hashmap; // the hashmap
52
53 JvmtiTagHashmapEntry* _free_entries; // free list for this environment
54 int _free_entries_count; // number of entries on the free list
|
1 /*
2 * Copyright (c) 2003, 2015, 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 // JvmtiTagMap
26
27 #ifndef SHARE_VM_PRIMS_JVMTITAGMAP_HPP
28 #define SHARE_VM_PRIMS_JVMTITAGMAP_HPP
29
30 #include "gc/shared/collectedHeap.hpp"
31 #include "gc/shared/genCollectedHeap.hpp"
32 #include "jvmtifiles/jvmti.h"
33 #include "jvmtifiles/jvmtiEnv.hpp"
34 #include "memory/allocation.hpp"
35 #include "memory/universe.hpp"
36
37 // forward references
38 class JvmtiTagHashmap;
39 class JvmtiTagHashmapEntry;
40 class JvmtiTagHashmapEntryClosure;
41
42 class JvmtiTagMap : public CHeapObj<mtInternal> {
43 private:
44
45 enum{
46 max_free_entries = 4096 // maximum number of free entries per env
47 };
48
49 JvmtiEnv* _env; // the jvmti environment
50 Mutex _lock; // lock for this tag map
51 JvmtiTagHashmap* _hashmap; // the hashmap
52
53 JvmtiTagHashmapEntry* _free_entries; // free list for this environment
54 int _free_entries_count; // number of entries on the free list
|