summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
0dd8209)
static gboolean trap_entry(void *hook_data, void *call_data)
{
LttvTracefileState *s = (LttvTracefileState *)call_data;
static gboolean trap_entry(void *hook_data, void *call_data)
{
LttvTracefileState *s = (LttvTracefileState *)call_data;
+ LttvTraceState *ts = (LttvTraceState *)s->parent.t_context;
LttEvent *e = ltt_tracefile_get_event(s->parent.tf);
LttvTraceHook *th = (LttvTraceHook *)hook_data;
struct marker_field *f = lttv_trace_get_hook_field(th, 0);
LttEvent *e = ltt_tracefile_get_event(s->parent.tf);
LttvTraceHook *th = (LttvTraceHook *)hook_data;
struct marker_field *f = lttv_trace_get_hook_field(th, 0);
/* update cpu status */
cpu_push_mode(s->cpu_state, LTTV_CPU_TRAP);
/* update cpu status */
cpu_push_mode(s->cpu_state, LTTV_CPU_TRAP);
+ /* update trap status */
+ s->cpu_state->last_trap = trap;
+ ts->trap_states[trap].running++;
+
return FALSE;
}
static gboolean trap_exit(void *hook_data, void *call_data)
{
LttvTracefileState *s = (LttvTracefileState *)call_data;
return FALSE;
}
static gboolean trap_exit(void *hook_data, void *call_data)
{
LttvTracefileState *s = (LttvTracefileState *)call_data;
+ LttvTraceState *ts = (LttvTraceState *)s->parent.t_context;
+ guint trap = s->cpu_state->last_trap;
pop_state(s, LTTV_STATE_TRAP);
/* update cpu status */
cpu_pop_mode(s->cpu_state);
pop_state(s, LTTV_STATE_TRAP);
/* update cpu status */
cpu_pop_mode(s->cpu_state);
+ /* update trap status */
+ if(ts->trap_states[trap].running)
+ ts->trap_states[trap].running--;
+
GdkColor drawing_colors_trap[NUM_COLORS_TRAP] =
{ /* Pixel, R, G, B */
{ 0, 0x0000, 0x0000, 0x0000 }, /* COL_TRAP_UNKNOWN */
GdkColor drawing_colors_trap[NUM_COLORS_TRAP] =
{ /* Pixel, R, G, B */
{ 0, 0x0000, 0x0000, 0x0000 }, /* COL_TRAP_UNKNOWN */
- { 0, 0xBBBB, 0xBBBB, 0xBBBB }, /* COL_TRAP_IDLE */
+ { 0, 0x0000, 0x0000, 0x0000 }, /* COL_TRAP_IDLE */
{ 0, 0xFF00, 0xFF00, 0x0100 }, /* COL_TRAP_BUSY */
};
{ 0, 0xFF00, 0xFF00, 0x0100 }, /* COL_TRAP_BUSY */
};
guint64 trap;
guint cpu = tfs->cpu;
guint64 trap;
guint cpu = tfs->cpu;
- guint16 ev_id_entry = marker_get_id_from_info(trace, marker_get_info_from_name(trace, lttv_merge_facility_event_name(LTT_FACILITY_KERNEL, LTT_EVENT_SOFT_IRQ_ENTRY)));
- guint16 ev_id_exit = marker_get_id_from_info(trace, marker_get_info_from_name(trace, lttv_merge_facility_event_name(LTT_FACILITY_KERNEL, LTT_EVENT_SOFT_IRQ_EXIT)));
+ guint16 ev_id_entry = marker_get_id_from_info(trace, marker_get_info_from_name(trace, lttv_merge_facility_event_name(LTT_FACILITY_KERNEL_ARCH, LTT_EVENT_TRAP_ENTRY)));
+ guint16 ev_id_exit = marker_get_id_from_info(trace, marker_get_info_from_name(trace, lttv_merge_facility_event_name(LTT_FACILITY_KERNEL_ARCH, LTT_EVENT_TRAP_EXIT)));
if(ev_id_entry == e->event_id) {
trap = ltt_event_get_long_unsigned(e, lttv_trace_get_hook_field(th, 0));
}
if(ev_id_entry == e->event_id) {
trap = ltt_event_get_long_unsigned(e, lttv_trace_get_hook_field(th, 0));
}