comparison 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
comparison
equal deleted inserted replaced
115:e7a91a357527 116:018d5b58dd4f
138 138
139 // Offsets for different nmethod parts 139 // Offsets for different nmethod parts
140 int _exception_offset; 140 int _exception_offset;
141 // All deoptee's will resume execution at this location described by this offset 141 // All deoptee's will resume execution at this location described by this offset
142 int _deoptimize_offset; 142 int _deoptimize_offset;
143 #ifdef HAVE_DTRACE_H
144 int _trap_offset;
145 #endif // def HAVE_DTRACE_H
143 int _stub_offset; 146 int _stub_offset;
144 int _consts_offset; 147 int _consts_offset;
145 int _scopes_data_offset; 148 int _scopes_data_offset;
146 int _scopes_pcs_offset; 149 int _scopes_pcs_offset;
147 int _dependencies_offset; 150 int _dependencies_offset;
208 CodeBuffer *code_buffer, 211 CodeBuffer *code_buffer,
209 int frame_size, 212 int frame_size,
210 ByteSize basic_lock_owner_sp_offset, /* synchronized natives only */ 213 ByteSize basic_lock_owner_sp_offset, /* synchronized natives only */
211 ByteSize basic_lock_sp_offset, /* synchronized natives only */ 214 ByteSize basic_lock_sp_offset, /* synchronized natives only */
212 OopMapSet* oop_maps); 215 OopMapSet* oop_maps);
216
217 #ifdef HAVE_DTRACE_H
218 // For native wrappers
219 nmethod(methodOop method,
220 int nmethod_size,
221 CodeOffsets* offsets,
222 CodeBuffer *code_buffer,
223 int frame_size);
224 #endif // def HAVE_DTRACE_H
213 225
214 // Creation support 226 // Creation support
215 nmethod(methodOop method, 227 nmethod(methodOop method,
216 int nmethod_size, 228 int nmethod_size,
217 int compile_id, 229 int compile_id,
269 int frame_complete, 281 int frame_complete,
270 int frame_size, 282 int frame_size,
271 ByteSize receiver_sp_offset, 283 ByteSize receiver_sp_offset,
272 ByteSize basic_lock_sp_offset, 284 ByteSize basic_lock_sp_offset,
273 OopMapSet* oop_maps); 285 OopMapSet* oop_maps);
286
287 #ifdef HAVE_DTRACE_H
288 // The method we generate for a dtrace probe has to look
289 // like an nmethod as far as the rest of the system is concerned
290 // which is somewhat unfortunate.
291 static nmethod* new_dtrace_nmethod(methodHandle method,
292 CodeBuffer *code_buffer,
293 int vep_offset,
294 int trap_offset,
295 int frame_complete,
296 int frame_size);
297
298 int trap_offset() const { return _trap_offset; }
299 address trap_address() const { return code_begin() + _trap_offset; }
300
301 #endif // def HAVE_DTRACE_H
274 302
275 // accessors 303 // accessors
276 methodOop method() const { return _method; } 304 methodOop method() const { return _method; }
277 AbstractCompiler* compiler() const { return _compiler; } 305 AbstractCompiler* compiler() const { return _compiler; }
278 306