Mercurial > hg > truffle
diff src/share/vm/code/nmethod.hpp @ 116:018d5b58dd4f
6537506: Provide a mechanism for specifying Java-level USDT-like dtrace probes
Summary: Initial checkin of JSDT code
Reviewed-by: acorn, sbohne
author | kamg |
---|---|
date | Thu, 17 Apr 2008 22:18:15 -0400 |
parents | c7c777385a15 |
children | d1605aabd0a1 |
line wrap: on
line diff
--- a/src/share/vm/code/nmethod.hpp Wed Apr 16 17:36:29 2008 -0400 +++ b/src/share/vm/code/nmethod.hpp Thu Apr 17 22:18:15 2008 -0400 @@ -140,6 +140,9 @@ int _exception_offset; // All deoptee's will resume execution at this location described by this offset int _deoptimize_offset; +#ifdef HAVE_DTRACE_H + int _trap_offset; +#endif // def HAVE_DTRACE_H int _stub_offset; int _consts_offset; int _scopes_data_offset; @@ -211,6 +214,15 @@ ByteSize basic_lock_sp_offset, /* synchronized natives only */ OopMapSet* oop_maps); +#ifdef HAVE_DTRACE_H + // For native wrappers + nmethod(methodOop method, + int nmethod_size, + CodeOffsets* offsets, + CodeBuffer *code_buffer, + int frame_size); +#endif // def HAVE_DTRACE_H + // Creation support nmethod(methodOop method, int nmethod_size, @@ -272,6 +284,22 @@ ByteSize basic_lock_sp_offset, OopMapSet* oop_maps); +#ifdef HAVE_DTRACE_H + // The method we generate for a dtrace probe has to look + // like an nmethod as far as the rest of the system is concerned + // which is somewhat unfortunate. + static nmethod* new_dtrace_nmethod(methodHandle method, + CodeBuffer *code_buffer, + int vep_offset, + int trap_offset, + int frame_complete, + int frame_size); + + int trap_offset() const { return _trap_offset; } + address trap_address() const { return code_begin() + _trap_offset; } + +#endif // def HAVE_DTRACE_H + // accessors methodOop method() const { return _method; } AbstractCompiler* compiler() const { return _compiler; }