* MA 02111-1307, USA.
*/
+#define _GNU_SOURCE
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <lttv/lttv.h>
#include <lttv/module.h>
#include <lttv/state.h>
-#include <ltt/facility.h>
#include <ltt/trace.h>
#include <ltt/event.h>
-#include <ltt/type.h>
#include <stdio.h>
#include <string.h>
LTT_EVENT_FUNCTION_EXIT,
LTT_EVENT_THREAD_BRAND,
LTT_EVENT_REQUEST_ISSUE,
- LTT_EVENT_REQUEST_COMPLETE;
+ LTT_EVENT_REQUEST_COMPLETE,
+ LTT_EVENT_LIST_INTERRUPT;
/* Fields Quarks */
LTT_FIELD_CALL_SITE,
LTT_FIELD_MINOR,
LTT_FIELD_MAJOR,
- LTT_FIELD_OPERATION;
+ LTT_FIELD_OPERATION,
+ LTT_FIELD_ACTION,
+ LTT_FIELD_NUM;
LttvExecutionMode
LTTV_STATE_MODE_UNKNOWN,
{
FILE *fp;
GPtrArray *quarktable;
- char *trace_path;
+ const char *trace_path;
char path[PATH_MAX];
guint count;
guint i;
}
for(i = 0 ; i < process->user_stack->len; i++) {
- address = &g_array_index(process->user_stack, guint64, i);
+ address = g_array_index(process->user_stack, guint64, i);
fprintf(fp, " <USER_STACK ADDRESS=\"%llu\"/>\n",
address);
}
}
for(i = 0 ; i < process->user_stack->len; i++) {
- address = &g_array_index(process->user_stack, guint64, i);
+ address = g_array_index(process->user_stack, guint64, i);
fputc(HDR_USER_STACK, fp);
fwrite(&address, sizeof(address), 1, fp);
#if 0
} while(1);
end_loop:
*(tcs->max_time_state_recomputed_in_seek) = tcs->parent.time_span.end_time;
- restore_init_state(tcs);
+ restore_init_state(&tcs->parent);
lttv_process_trace_seek_time(tcs, ltt_time_zero);
return;
}
return FALSE;
}
+static gboolean enum_interrupt(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);
+ guint8 fac_id = ltt_event_facility_id(e);
+ guint8 ev_id = ltt_event_eventtype_id(e);
+ LttvTraceHookByFacility *thf = (LttvTraceHookByFacility *)hook_data;
+
+ GQuark action = g_quark_from_string(ltt_event_get_string(e, thf->f1));
+ guint irq = ltt_event_get_long_unsigned(e, thf->f2);
+
+ ts->irq_names[irq] = action;
+
+ return FALSE;
+}
+
+
static gboolean bdev_request_issue(void *hook_data, void *call_data)
{
LttvTracefileState *s = (LttvTracefileState *)call_data;
statedump_end, NULL, &g_array_index(hooks, LttvTraceHook, hn++));
if(ret) hn--;
+ ret = lttv_trace_find_hook(ts->parent.t,
+ LTT_FACILITY_LIST, LTT_EVENT_LIST_INTERRUPT,
+ LTT_FIELD_ACTION, LTT_FIELD_NUM, 0,
+ enum_interrupt, NULL, &g_array_index(hooks, LttvTraceHook, hn++));
+ if(ret) hn--;
+
ret = lttv_trace_find_hook(ts->parent.t,
LTT_FACILITY_BLOCK, LTT_EVENT_REQUEST_ISSUE,
LTT_FIELD_MAJOR, LTT_FIELD_MINOR, LTT_FIELD_OPERATION,
LTT_EVENT_THREAD_BRAND = g_quark_from_string("thread_brand");
LTT_EVENT_REQUEST_ISSUE = g_quark_from_string("_blk_request_issue");
LTT_EVENT_REQUEST_COMPLETE = g_quark_from_string("_blk_request_complete");
+ LTT_EVENT_LIST_INTERRUPT = g_quark_from_string("interrupt");;
LTT_FIELD_SYSCALL_ID = g_quark_from_string("syscall_id");
LTT_FIELD_MAJOR = g_quark_from_string("major");
LTT_FIELD_MINOR = g_quark_from_string("minor");
LTT_FIELD_OPERATION = g_quark_from_string("direction");
+ LTT_FIELD_ACTION = g_quark_from_string("action");
+ LTT_FIELD_NUM = g_quark_from_string("num");
LTTV_CPU_UNKNOWN = g_quark_from_string("unknown");
LTTV_CPU_IDLE = g_quark_from_string("idle");