Mercurial > hg > graal-jvmci-8
annotate src/share/vm/prims/jvmtiTagMap.hpp @ 10241:d17700c82d7d
8006088: Incompatible heap size flags accepted by VM
Summary: Make processing of minimum, initial and maximum heap size more intiutive by removing previous limitations on allowed values, and make error reporting consistent. Further, fix errors in ergonomic heap sizing.
Reviewed-by: johnc, jwilhelm, tamao
author | tschatzl |
---|---|
date | Mon, 06 May 2013 17:19:42 +0200 |
parents | 8b46b0196eb0 |
children |
rev | line source |
---|---|
0 | 1 /* |
7951 | 2 * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. |
0 | 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 * | |
1552
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
0
diff
changeset
|
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
0
diff
changeset
|
20 * or visit www.oracle.com if you need additional information or have any |
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
0
diff
changeset
|
21 * questions. |
0 | 22 * |
23 */ | |
24 | |
25 // JvmtiTagMap | |
26 | |
1972 | 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" | |
0 | 36 |
37 // forward references | |
38 class JvmtiTagHashmap; | |
39 class JvmtiTagHashmapEntry; | |
40 class JvmtiTagHashmapEntryClosure; | |
41 | |
6197 | 42 class JvmtiTagMap : public CHeapObj<mtInternal> { |
0 | 43 private: |
44 | |
45 enum{ | |
2125
7246a374a9f2
6458402: 3 jvmti tests fail with CMS and +ExplicitGCInvokesConcurrent
kamg
parents:
1972
diff
changeset
|
46 max_free_entries = 4096 // maximum number of free entries per env |
0 | 47 }; |
48 | |
49 JvmtiEnv* _env; // the jvmti environment | |
50 Mutex _lock; // lock for this tag map | |
2125
7246a374a9f2
6458402: 3 jvmti tests fail with CMS and +ExplicitGCInvokesConcurrent
kamg
parents:
1972
diff
changeset
|
51 JvmtiTagHashmap* _hashmap; // the hashmap |
0 | 52 |
53 JvmtiTagHashmapEntry* _free_entries; // free list for this environment | |
54 int _free_entries_count; // number of entries on the free list | |
55 | |
56 // create a tag map | |
57 JvmtiTagMap(JvmtiEnv* env); | |
58 | |
59 // accessors | |
60 inline Mutex* lock() { return &_lock; } | |
61 inline JvmtiEnv* env() const { return _env; } | |
62 | |
2125
7246a374a9f2
6458402: 3 jvmti tests fail with CMS and +ExplicitGCInvokesConcurrent
kamg
parents:
1972
diff
changeset
|
63 void do_weak_oops(BoolObjectClosure* is_alive, OopClosure* f); |
0 | 64 |
65 // iterate over all entries in this tag map | |
66 void entry_iterate(JvmtiTagHashmapEntryClosure* closure); | |
67 | |
68 public: | |
69 | |
70 // indicates if this tag map is locked | |
71 bool is_locked() { return lock()->is_locked(); } | |
72 | |
2125
7246a374a9f2
6458402: 3 jvmti tests fail with CMS and +ExplicitGCInvokesConcurrent
kamg
parents:
1972
diff
changeset
|
73 JvmtiTagHashmap* hashmap() { return _hashmap; } |
0 | 74 |
75 // create/destroy entries | |
2125
7246a374a9f2
6458402: 3 jvmti tests fail with CMS and +ExplicitGCInvokesConcurrent
kamg
parents:
1972
diff
changeset
|
76 JvmtiTagHashmapEntry* create_entry(oop ref, jlong tag); |
0 | 77 void destroy_entry(JvmtiTagHashmapEntry* entry); |
78 | |
79 // returns true if the hashmaps are empty | |
80 bool is_empty(); | |
81 | |
82 // return tag for the given environment | |
83 static JvmtiTagMap* tag_map_for(JvmtiEnv* env); | |
84 | |
85 // destroy tag map | |
86 ~JvmtiTagMap(); | |
87 | |
88 // set/get tag | |
89 void set_tag(jobject obj, jlong tag); | |
90 jlong get_tag(jobject obj); | |
91 | |
92 // deprecated heap iteration functions | |
93 void iterate_over_heap(jvmtiHeapObjectFilter object_filter, | |
94 KlassHandle klass, | |
95 jvmtiHeapObjectCallback heap_object_callback, | |
96 const void* user_data); | |
97 | |
98 void iterate_over_reachable_objects(jvmtiHeapRootCallback heap_root_callback, | |
99 jvmtiStackReferenceCallback stack_ref_callback, | |
100 jvmtiObjectReferenceCallback object_ref_callback, | |
101 const void* user_data); | |
102 | |
103 void iterate_over_objects_reachable_from_object(jobject object, | |
104 jvmtiObjectReferenceCallback object_reference_callback, | |
105 const void* user_data); | |
106 | |
107 | |
108 // advanced (JVMTI 1.1) heap iteration functions | |
109 void iterate_through_heap(jint heap_filter, | |
110 KlassHandle klass, | |
111 const jvmtiHeapCallbacks* callbacks, | |
112 const void* user_data); | |
113 | |
114 void follow_references(jint heap_filter, | |
115 KlassHandle klass, | |
116 jobject initial_object, | |
117 const jvmtiHeapCallbacks* callbacks, | |
118 const void* user_data); | |
119 | |
120 // get tagged objects | |
121 jvmtiError get_objects_with_tags(const jlong* tags, jint count, | |
122 jint* count_ptr, jobject** object_result_ptr, | |
123 jlong** tag_result_ptr); | |
124 | |
2125
7246a374a9f2
6458402: 3 jvmti tests fail with CMS and +ExplicitGCInvokesConcurrent
kamg
parents:
1972
diff
changeset
|
125 static void weak_oops_do( |
6854
fb19af007ffc
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
6197
diff
changeset
|
126 BoolObjectClosure* is_alive, OopClosure* f) NOT_JVMTI_RETURN; |
0 | 127 }; |
128 | |
1972 | 129 #endif // SHARE_VM_PRIMS_JVMTITAGMAP_HPP |