Mercurial > hg > truffle
comparison src/share/vm/code/nmethod.hpp @ 2044:06f017f7daa7
Merge.
author | Thomas Wuerthinger <wuerthinger@ssw.jku.at> |
---|---|
date | Fri, 07 Jan 2011 18:18:08 +0100 |
parents | 4853c5cad3aa 09b4dd4f152b |
children | 0cd39a385a72 |
comparison
equal
deleted
inserted
replaced
1942:00bc9eaf0e24 | 2044:06f017f7daa7 |
---|---|
20 * or visit www.oracle.com if you need additional information or have any | 20 * or visit www.oracle.com if you need additional information or have any |
21 * questions. | 21 * questions. |
22 * | 22 * |
23 */ | 23 */ |
24 | 24 |
25 #ifndef SHARE_VM_CODE_NMETHOD_HPP | |
26 #define SHARE_VM_CODE_NMETHOD_HPP | |
27 | |
28 #include "code/codeBlob.hpp" | |
29 #include "code/pcDesc.hpp" | |
30 | |
25 // This class is used internally by nmethods, to cache | 31 // This class is used internally by nmethods, to cache |
26 // exception/pc/handler information. | 32 // exception/pc/handler information. |
27 | 33 |
28 class ExceptionCache : public CHeapObj { | 34 class ExceptionCache : public CHeapObj { |
29 friend class VMStructs; | 35 friend class VMStructs; |
202 long _stack_traversal_mark; | 208 long _stack_traversal_mark; |
203 | 209 |
204 ExceptionCache *_exception_cache; | 210 ExceptionCache *_exception_cache; |
205 PcDescCache _pc_desc_cache; | 211 PcDescCache _pc_desc_cache; |
206 | 212 |
207 // These are only used for compiled synchronized native methods to | 213 // These are used for compiled synchronized native methods to |
208 // locate the owner and stack slot for the BasicLock so that we can | 214 // locate the owner and stack slot for the BasicLock so that we can |
209 // properly revoke the bias of the owner if necessary. They are | 215 // properly revoke the bias of the owner if necessary. They are |
210 // needed because there is no debug information for compiled native | 216 // needed because there is no debug information for compiled native |
211 // wrappers and the oop maps are insufficient to allow | 217 // wrappers and the oop maps are insufficient to allow |
212 // frame::retrieve_receiver() to work. Currently they are expected | 218 // frame::retrieve_receiver() to work. Currently they are expected |
213 // to be byte offsets from the Java stack pointer for maximum code | 219 // to be byte offsets from the Java stack pointer for maximum code |
214 // sharing between platforms. Note that currently biased locking | 220 // sharing between platforms. Note that currently biased locking |
215 // will never cause Class instances to be biased but this code | 221 // will never cause Class instances to be biased but this code |
216 // handles the static synchronized case as well. | 222 // handles the static synchronized case as well. |
217 ByteSize _compiled_synchronized_native_basic_lock_owner_sp_offset; | 223 // JVMTI's GetLocalInstance() also uses these offsets to find the receiver |
218 ByteSize _compiled_synchronized_native_basic_lock_sp_offset; | 224 // for non-static native wrapper frames. |
225 ByteSize _native_receiver_sp_offset; | |
226 ByteSize _native_basic_lock_sp_offset; | |
219 | 227 |
220 friend class nmethodLocker; | 228 friend class nmethodLocker; |
221 | 229 |
222 // For native wrappers | 230 // For native wrappers |
223 nmethod(methodOop method, | 231 nmethod(methodOop method, |
671 | 679 |
672 // is it ok to patch at address? | 680 // is it ok to patch at address? |
673 bool is_patchable_at(address instr_address); | 681 bool is_patchable_at(address instr_address); |
674 | 682 |
675 // UseBiasedLocking support | 683 // UseBiasedLocking support |
676 ByteSize compiled_synchronized_native_basic_lock_owner_sp_offset() { | 684 ByteSize native_receiver_sp_offset() { |
677 return _compiled_synchronized_native_basic_lock_owner_sp_offset; | 685 return _native_receiver_sp_offset; |
678 } | 686 } |
679 ByteSize compiled_synchronized_native_basic_lock_sp_offset() { | 687 ByteSize native_basic_lock_sp_offset() { |
680 return _compiled_synchronized_native_basic_lock_sp_offset; | 688 return _native_basic_lock_sp_offset; |
681 } | 689 } |
682 | 690 |
683 // support for code generation | 691 // support for code generation |
684 static int verified_entry_point_offset() { return offset_of(nmethod, _verified_entry_point); } | 692 static int verified_entry_point_offset() { return offset_of(nmethod, _verified_entry_point); } |
685 static int osr_entry_point_offset() { return offset_of(nmethod, _osr_entry_point); } | 693 static int osr_entry_point_offset() { return offset_of(nmethod, _osr_entry_point); } |
705 unlock_nmethod(_nm); // note: This works even if _nm==new_nm. | 713 unlock_nmethod(_nm); // note: This works even if _nm==new_nm. |
706 _nm = new_nm; | 714 _nm = new_nm; |
707 lock_nmethod(_nm); | 715 lock_nmethod(_nm); |
708 } | 716 } |
709 }; | 717 }; |
718 | |
719 #endif // SHARE_VM_CODE_NMETHOD_HPP |