comparison src/share/vm/prims/forte.cpp @ 11019:eaf3742822ec

Merge
author chegar
date Mon, 17 Jun 2013 11:17:49 +0100
parents dcb062bea05b
children ef57c43512d6
comparison
equal deleted inserted replaced
11018:0861193d358a 11019:eaf3742822ec
33 #include "prims/forte.hpp" 33 #include "prims/forte.hpp"
34 #include "runtime/thread.hpp" 34 #include "runtime/thread.hpp"
35 #include "runtime/vframe.hpp" 35 #include "runtime/vframe.hpp"
36 #include "runtime/vframeArray.hpp" 36 #include "runtime/vframeArray.hpp"
37 37
38 // call frame copied from old .h file and renamed
39 typedef struct {
40 jint lineno; // line number in the source file
41 jmethodID method_id; // method executed in this frame
42 } ASGCT_CallFrame;
43
44 // call trace copied from old .h file and renamed
45 typedef struct {
46 JNIEnv *env_id; // Env where trace was recorded
47 jint num_frames; // number of frames in this trace
48 ASGCT_CallFrame *frames; // frames
49 } ASGCT_CallTrace;
50
38 // These name match the names reported by the forte quality kit 51 // These name match the names reported by the forte quality kit
39 enum { 52 enum {
40 ticks_no_Java_frame = 0, 53 ticks_no_Java_frame = 0,
41 ticks_no_class_load = -1, 54 ticks_no_class_load = -1,
42 ticks_GC_active = -2, 55 ticks_GC_active = -2,
48 ticks_thread_exit = -8, 61 ticks_thread_exit = -8,
49 ticks_deopt = -9, 62 ticks_deopt = -9,
50 ticks_safepoint = -10 63 ticks_safepoint = -10
51 }; 64 };
52 65
66 #if INCLUDE_JVMTI
67
53 //------------------------------------------------------- 68 //-------------------------------------------------------
54 69
55 // Native interfaces for use by Forte tools. 70 // Native interfaces for use by Forte tools.
56 71
57 72
357 } 372 }
358 373
359 return false; 374 return false;
360 375
361 } 376 }
362
363
364 // call frame copied from old .h file and renamed
365 typedef struct {
366 jint lineno; // line number in the source file
367 jmethodID method_id; // method executed in this frame
368 } ASGCT_CallFrame;
369
370 // call trace copied from old .h file and renamed
371 typedef struct {
372 JNIEnv *env_id; // Env where trace was recorded
373 jint num_frames; // number of frames in this trace
374 ASGCT_CallFrame *frames; // frames
375 } ASGCT_CallTrace;
376 377
377 static void forte_fill_call_trace_given_top(JavaThread* thd, 378 static void forte_fill_call_trace_given_top(JavaThread* thd,
378 ASGCT_CallTrace* trace, 379 ASGCT_CallTrace* trace,
379 int depth, 380 int depth,
380 frame top_frame) { 381 frame top_frame) {
632 633
633 collector_func_load((char*)name, NULL, NULL, start, 634 collector_func_load((char*)name, NULL, NULL, start,
634 pointer_delta(end, start, sizeof(jbyte)), 0, NULL); 635 pointer_delta(end, start, sizeof(jbyte)), 0, NULL);
635 #endif // !_WINDOWS && !IA64 636 #endif // !_WINDOWS && !IA64
636 } 637 }
638
639 #else // INCLUDE_JVMTI
640 extern "C" {
641 JNIEXPORT
642 void AsyncGetCallTrace(ASGCT_CallTrace *trace, jint depth, void* ucontext) {
643 trace->num_frames = ticks_no_class_load; // -1
644 }
645 }
646 #endif // INCLUDE_JVMTI