mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-26 06:14:49 +02:00
6537506: Provide a mechanism for specifying Java-level USDT-like dtrace probes
Initial checkin of JSDT code Reviewed-by: acorn, sbohne
This commit is contained in:
parent
849e0dfc44
commit
f072bc9d3f
26 changed files with 2935 additions and 26 deletions
|
@ -140,6 +140,9 @@ class nmethod : public CodeBlob {
|
|||
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 @@ class nmethod : public CodeBlob {
|
|||
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 @@ class nmethod : public CodeBlob {
|
|||
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; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue