Mercurial > hg > truffle
comparison src/share/vm/interpreter/bytecodeInterpreter.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 | 4b95bbb36464 |
children | a3e2f723f2a5 |
comparison
equal
deleted
inserted
replaced
6724:36d1d483d5d6 | 6725:da91efe96a93 |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved. | 2 * Copyright (c) 2002, 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. |
24 | 24 |
25 #ifndef SHARE_VM_INTERPRETER_BYTECODEINTERPRETER_HPP | 25 #ifndef SHARE_VM_INTERPRETER_BYTECODEINTERPRETER_HPP |
26 #define SHARE_VM_INTERPRETER_BYTECODEINTERPRETER_HPP | 26 #define SHARE_VM_INTERPRETER_BYTECODEINTERPRETER_HPP |
27 | 27 |
28 #include "memory/allocation.hpp" | 28 #include "memory/allocation.hpp" |
29 #include "oops/methodDataOop.hpp" | 29 #include "oops/methodData.hpp" |
30 #include "oops/methodOop.hpp" | 30 #include "oops/method.hpp" |
31 #include "runtime/basicLock.hpp" | 31 #include "runtime/basicLock.hpp" |
32 #include "runtime/frame.hpp" | 32 #include "runtime/frame.hpp" |
33 #include "runtime/globals.hpp" | 33 #include "runtime/globals.hpp" |
34 #include "utilities/globalDefinitions.hpp" | 34 #include "utilities/globalDefinitions.hpp" |
35 #ifdef TARGET_ARCH_x86 | 35 #ifdef TARGET_ARCH_x86 |
60 | 60 |
61 | 61 |
62 typedef class BytecodeInterpreter* interpreterState; | 62 typedef class BytecodeInterpreter* interpreterState; |
63 | 63 |
64 struct call_message { | 64 struct call_message { |
65 class methodOopDesc* _callee; /* method to call during call_method request */ | 65 class Method* _callee; /* method to call during call_method request */ |
66 address _callee_entry_point; /* address to jump to for call_method request */ | 66 address _callee_entry_point; /* address to jump to for call_method request */ |
67 int _bcp_advance; /* size of the invoke bytecode operation */ | 67 int _bcp_advance; /* size of the invoke bytecode operation */ |
68 }; | 68 }; |
69 | 69 |
70 struct osr_message { | 70 struct osr_message { |
117 | 117 |
118 private: | 118 private: |
119 JavaThread* _thread; // the vm's java thread pointer | 119 JavaThread* _thread; // the vm's java thread pointer |
120 address _bcp; // instruction pointer | 120 address _bcp; // instruction pointer |
121 intptr_t* _locals; // local variable pointer | 121 intptr_t* _locals; // local variable pointer |
122 constantPoolCacheOop _constants; // constant pool cache | 122 ConstantPoolCache* _constants; // constant pool cache |
123 methodOop _method; // method being executed | 123 Method* _method; // method being executed |
124 DataLayout* _mdx; // compiler profiling data for current bytecode | 124 DataLayout* _mdx; // compiler profiling data for current bytecode |
125 intptr_t* _stack; // expression stack | 125 intptr_t* _stack; // expression stack |
126 messages _msg; // frame manager <-> interpreter message | 126 messages _msg; // frame manager <-> interpreter message |
127 frame_manager_message _result; // result to frame manager | 127 frame_manager_message _result; // result to frame manager |
128 interpreterState _prev_link; // previous interpreter state | 128 interpreterState _prev_link; // previous interpreter state |
141 // Deoptimization support | 141 // Deoptimization support |
142 // | 142 // |
143 static void layout_interpreterState(interpreterState to_fill, | 143 static void layout_interpreterState(interpreterState to_fill, |
144 frame* caller, | 144 frame* caller, |
145 frame* interpreter_frame, | 145 frame* interpreter_frame, |
146 methodOop method, | 146 Method* method, |
147 intptr_t* locals, | 147 intptr_t* locals, |
148 intptr_t* stack, | 148 intptr_t* stack, |
149 intptr_t* stack_base, | 149 intptr_t* stack_base, |
150 intptr_t* monitor_base, | 150 intptr_t* monitor_base, |
151 intptr_t* frame_bottom, | 151 intptr_t* frame_bottom, |
195 inline address bcp() { return _bcp; } | 195 inline address bcp() { return _bcp; } |
196 inline void set_bcp(address new_bcp) { _bcp = new_bcp; } | 196 inline void set_bcp(address new_bcp) { _bcp = new_bcp; } |
197 | 197 |
198 inline intptr_t* locals() { return _locals; } | 198 inline intptr_t* locals() { return _locals; } |
199 | 199 |
200 inline constantPoolCacheOop constants() { return _constants; } | 200 inline ConstantPoolCache* constants() { return _constants; } |
201 inline methodOop method() { return _method; } | 201 inline Method* method() { return _method; } |
202 inline DataLayout* mdx() { return _mdx; } | 202 inline DataLayout* mdx() { return _mdx; } |
203 inline void set_mdx(DataLayout *new_mdx) { _mdx = new_mdx; } | 203 inline void set_mdx(DataLayout *new_mdx) { _mdx = new_mdx; } |
204 | 204 |
205 inline messages msg() { return _msg; } | 205 inline messages msg() { return _msg; } |
206 inline void set_msg(messages new_msg) { _msg = new_msg; } | 206 inline void set_msg(messages new_msg) { _msg = new_msg; } |
207 | 207 |
208 inline methodOop callee() { return _result._to_call._callee; } | 208 inline Method* callee() { return _result._to_call._callee; } |
209 inline void set_callee(methodOop new_callee) { _result._to_call._callee = new_callee; } | 209 inline void set_callee(Method* new_callee) { _result._to_call._callee = new_callee; } |
210 inline void set_callee_entry_point(address entry) { _result._to_call._callee_entry_point = entry; } | 210 inline void set_callee_entry_point(address entry) { _result._to_call._callee_entry_point = entry; } |
211 inline void set_osr_buf(address buf) { _result._osr._osr_buf = buf; } | 211 inline void set_osr_buf(address buf) { _result._osr._osr_buf = buf; } |
212 inline void set_osr_entry(address entry) { _result._osr._osr_entry = entry; } | 212 inline void set_osr_entry(address entry) { _result._osr._osr_entry = entry; } |
213 inline int bcp_advance() { return _result._to_call._bcp_advance; } | 213 inline int bcp_advance() { return _result._to_call._bcp_advance; } |
214 inline void set_bcp_advance(int count) { _result._to_call._bcp_advance = count; } | 214 inline void set_bcp_advance(int count) { _result._to_call._bcp_advance = count; } |