comparison src/share/vm/ci/ciMethod.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 1d7922586cf6
children bd7a7ce2e264
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.
40 class BCEscapeAnalyzer; 40 class BCEscapeAnalyzer;
41 41
42 42
43 // ciMethod 43 // ciMethod
44 // 44 //
45 // This class represents a methodOop in the HotSpot virtual 45 // This class represents a Method* in the HotSpot virtual
46 // machine. 46 // machine.
47 class ciMethod : public ciObject { 47 class ciMethod : public ciMetadata {
48 friend class CompileBroker; 48 friend class CompileBroker;
49 CI_PACKAGE_ACCESS 49 CI_PACKAGE_ACCESS
50 friend class ciEnv; 50 friend class ciEnv;
51 friend class ciExceptionHandlerStream; 51 friend class ciExceptionHandlerStream;
52 friend class ciBytecodeStream; 52 friend class ciBytecodeStream;
88 #endif 88 #endif
89 89
90 ciMethod(methodHandle h_m); 90 ciMethod(methodHandle h_m);
91 ciMethod(ciInstanceKlass* holder, ciSymbol* name, ciSymbol* signature, ciInstanceKlass* accessor); 91 ciMethod(ciInstanceKlass* holder, ciSymbol* name, ciSymbol* signature, ciInstanceKlass* accessor);
92 92
93 methodOop get_methodOop() const { 93 Method* get_Method() const {
94 methodOop m = (methodOop)get_oop(); 94 Method* m = (Method*)_metadata;
95 assert(m != NULL, "illegal use of unloaded method"); 95 assert(m != NULL, "illegal use of unloaded method");
96 return m; 96 return m;
97 } 97 }
98 98
99 oop loader() const { return _holder->loader(); } 99 oop loader() const { return _holder->loader(); }
162 int interpreter_throwout_count() const { check_is_loaded(); return _interpreter_throwout_count; } 162 int interpreter_throwout_count() const { check_is_loaded(); return _interpreter_throwout_count; }
163 163
164 // Code size for inlining decisions. 164 // Code size for inlining decisions.
165 int code_size_for_inlining(); 165 int code_size_for_inlining();
166 166
167 bool force_inline() { return get_methodOop()->force_inline(); } 167 bool force_inline() { return get_Method()->force_inline(); }
168 bool dont_inline() { return get_methodOop()->dont_inline(); } 168 bool dont_inline() { return get_Method()->dont_inline(); }
169 169
170 int comp_level(); 170 int comp_level();
171 int highest_osr_comp_level(); 171 int highest_osr_comp_level();
172 172
173 Bytecodes::Code java_code_at_bci(int bci) { 173 Bytecodes::Code java_code_at_bci(int bci) {
266 bool is_method_handle_intrinsic() const; 266 bool is_method_handle_intrinsic() const;
267 bool is_compiled_lambda_form() const; 267 bool is_compiled_lambda_form() const;
268 bool has_member_arg() const; 268 bool has_member_arg() const;
269 269
270 // What kind of ciObject is this? 270 // What kind of ciObject is this?
271 bool is_method() { return true; } 271 bool is_method() const { return true; }
272 272
273 // Java access flags 273 // Java access flags
274 bool is_public () const { return flags().is_public(); } 274 bool is_public () const { return flags().is_public(); }
275 bool is_private () const { return flags().is_private(); } 275 bool is_private () const { return flags().is_private(); }
276 bool is_protected () const { return flags().is_protected(); } 276 bool is_protected () const { return flags().is_protected(); }