Mercurial > hg > truffle
comparison src/share/vm/prims/jvmtiImpl.hpp @ 6725:da91efe96a93
6964458: Reimplement class meta-data storage to use native memory
Summary: Remove PermGen, allocate meta-data in metaspace linked to class loaders, rewrite GC walking, rewrite and rename metadata to be C++ classes
Reviewed-by: jmasa, stefank, never, coleenp, kvn, brutisso, mgerdin, dholmes, jrose, twisti, roland
Contributed-by: jmasa <jon.masamitsu@oracle.com>, stefank <stefan.karlsson@oracle.com>, mgerdin <mikael.gerdin@oracle.com>, never <tom.rodriguez@oracle.com>
author | coleenp |
---|---|
date | Sat, 01 Sep 2012 13:25:18 -0400 |
parents | d2a62e0f25eb |
children | fb19af007ffc |
comparison
equal
deleted
inserted
replaced
6724:36d1d483d5d6 | 6725:da91efe96a93 |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved. | 2 * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * | 4 * |
5 * This code is free software; you can redistribute it and/or modify it | 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 | 6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
162 // Note: Extends GrowableElement for use in a GrowableCache | 162 // Note: Extends GrowableElement for use in a GrowableCache |
163 // | 163 // |
164 // A JvmtiBreakpoint describes a location (class, method, bci) to break at. | 164 // A JvmtiBreakpoint describes a location (class, method, bci) to break at. |
165 // | 165 // |
166 | 166 |
167 typedef void (methodOopDesc::*method_action)(int _bci); | 167 typedef void (Method::*method_action)(int _bci); |
168 | 168 |
169 class JvmtiBreakpoint : public GrowableElement { | 169 class JvmtiBreakpoint : public GrowableElement { |
170 private: | 170 private: |
171 methodOop _method; | 171 Method* _method; |
172 int _bci; | 172 int _bci; |
173 Bytecodes::Code _orig_bytecode; | 173 Bytecodes::Code _orig_bytecode; |
174 oop _class_loader; | |
174 | 175 |
175 public: | 176 public: |
176 JvmtiBreakpoint(); | 177 JvmtiBreakpoint(); |
177 JvmtiBreakpoint(methodOop m_method, jlocation location); | 178 JvmtiBreakpoint(Method* m_method, jlocation location); |
178 bool equals(JvmtiBreakpoint& bp); | 179 bool equals(JvmtiBreakpoint& bp); |
179 bool lessThan(JvmtiBreakpoint &bp); | 180 bool lessThan(JvmtiBreakpoint &bp); |
180 void copy(JvmtiBreakpoint& bp); | 181 void copy(JvmtiBreakpoint& bp); |
181 bool is_valid(); | 182 bool is_valid(); |
182 address getBcp(); | 183 address getBcp(); |
183 void each_method_version_do(method_action meth_act); | 184 void each_method_version_do(method_action meth_act); |
184 void set(); | 185 void set(); |
185 void clear(); | 186 void clear(); |
186 void print(); | 187 void print(); |
187 | 188 |
188 methodOop method() { return _method; } | 189 Method* method() { return _method; } |
189 | 190 |
190 // GrowableElement implementation | 191 // GrowableElement implementation |
191 address getCacheValue() { return getBcp(); } | 192 address getCacheValue() { return getBcp(); } |
192 bool lessThan(GrowableElement* e) { Unimplemented(); return false; } | 193 bool lessThan(GrowableElement* e) { Unimplemented(); return false; } |
193 bool equals(GrowableElement* e) { return equals((JvmtiBreakpoint&) *e); } | 194 bool equals(GrowableElement* e) { return equals((JvmtiBreakpoint&) *e); } |
194 void oops_do(OopClosure* f) { f->do_oop((oop *) &_method); } | 195 void oops_do(OopClosure* f) { |
196 // Mark the method loader as live | |
197 f->do_oop(&_class_loader); | |
198 } | |
195 GrowableElement *clone() { | 199 GrowableElement *clone() { |
196 JvmtiBreakpoint *bp = new JvmtiBreakpoint(); | 200 JvmtiBreakpoint *bp = new JvmtiBreakpoint(); |
197 bp->copy(*this); | 201 bp->copy(*this); |
198 return bp; | 202 return bp; |
199 } | 203 } |
281 void oops_do(OopClosure* f); | 285 void oops_do(OopClosure* f); |
282 void print(); | 286 void print(); |
283 | 287 |
284 int set(JvmtiBreakpoint& bp); | 288 int set(JvmtiBreakpoint& bp); |
285 int clear(JvmtiBreakpoint& bp); | 289 int clear(JvmtiBreakpoint& bp); |
286 void clearall_in_class_at_safepoint(klassOop klass); | 290 void clearall_in_class_at_safepoint(Klass* klass); |
287 void clearall(); | 291 void clearall(); |
288 void gc_epilogue(); | 292 void gc_epilogue(); |
289 }; | 293 }; |
290 | 294 |
291 | 295 |