LttvTraceHook *hook;
- LttvTraceHookByFacility *thf;
+ LttvTraceHook *th;
guint ret;
gint before_hn, after_hn;
/* before hooks */
ret = lttv_trace_find_hook(ts->parent.t,
- LTT_FACILITY_KERNEL_ARCH, LTT_EVENT_SYSCALL_ENTRY,
+ LTT_EVENT_SYSCALL_ENTRY,
LTT_FIELD_SYSCALL_ID, 0, 0,
before_execmode_hook,
events_request,
if(ret) before_hn--;
ret = lttv_trace_find_hook(ts->parent.t,
- LTT_FACILITY_KERNEL_ARCH, LTT_EVENT_SYSCALL_EXIT,
+ LTT_EVENT_SYSCALL_EXIT,
0, 0, 0,
before_execmode_hook,
events_request,
if(ret) before_hn--;
ret = lttv_trace_find_hook(ts->parent.t,
- LTT_FACILITY_KERNEL_ARCH, LTT_EVENT_TRAP_ENTRY,
+ LTT_EVENT_TRAP_ENTRY,
LTT_FIELD_TRAP_ID, 0, 0,
before_execmode_hook,
events_request,
if(ret) before_hn--;
ret = lttv_trace_find_hook(ts->parent.t,
- LTT_FACILITY_KERNEL_ARCH, LTT_EVENT_TRAP_EXIT,
+ LTT_EVENT_TRAP_EXIT,
0, 0, 0,
before_execmode_hook,
events_request,
if(ret) before_hn--;
ret = lttv_trace_find_hook(ts->parent.t,
- LTT_FACILITY_KERNEL, LTT_EVENT_IRQ_ENTRY,
+ LTT_EVENT_IRQ_ENTRY,
LTT_FIELD_IRQ_ID, 0, 0,
before_execmode_hook,
events_request,
if(ret) before_hn--;
ret = lttv_trace_find_hook(ts->parent.t,
- LTT_FACILITY_KERNEL, LTT_EVENT_IRQ_EXIT,
+ LTT_EVENT_IRQ_EXIT,
0, 0, 0,
before_execmode_hook,
events_request,
if(ret) before_hn--;
ret = lttv_trace_find_hook(ts->parent.t,
- LTT_FACILITY_KERNEL, LTT_EVENT_SOFT_IRQ_ENTRY,
+ LTT_EVENT_SOFT_IRQ_ENTRY,
LTT_FIELD_SOFT_IRQ_ID, 0, 0,
before_execmode_hook,
events_request,
if(ret) before_hn--;
ret = lttv_trace_find_hook(ts->parent.t,
- LTT_FACILITY_KERNEL, LTT_EVENT_SOFT_IRQ_EXIT,
+ LTT_EVENT_SOFT_IRQ_EXIT,
0, 0, 0,
before_execmode_hook,
events_request,
ret = lttv_trace_find_hook(ts->parent.t,
- LTT_FACILITY_KERNEL, LTT_EVENT_SCHED_SCHEDULE,
+ LTT_EVENT_SCHED_SCHEDULE,
LTT_FIELD_PREV_PID, LTT_FIELD_NEXT_PID, LTT_FIELD_PREV_STATE,
before_schedchange_hook,
events_request,
if(ret) before_hn--;
ret = lttv_trace_find_hook(ts->parent.t,
- LTT_FACILITY_KERNEL, LTT_EVENT_PROCESS_EXIT,
+ LTT_EVENT_PROCESS_EXIT,
LTT_FIELD_PID, 0, 0,
before_process_exit_hook,
events_request,
if(ret) before_hn--;
ret = lttv_trace_find_hook(ts->parent.t,
- LTT_FACILITY_KERNEL, LTT_EVENT_PROCESS_FREE,
+ LTT_EVENT_PROCESS_FREE,
LTT_FIELD_PID, 0, 0,
before_process_release_hook,
events_request,
if(ret) before_hn--;
ret = lttv_trace_find_hook(ts->parent.t,
- LTT_FACILITY_LIST, LTT_EVENT_STATEDUMP_END,
+ LTT_EVENT_STATEDUMP_END,
0, 0, 0,
before_statedump_end,
events_request,
after_hn = before_hn;
ret = lttv_trace_find_hook(ts->parent.t,
- LTT_FACILITY_KERNEL, LTT_EVENT_SCHED_SCHEDULE,
+ LTT_EVENT_SCHED_SCHEDULE,
LTT_FIELD_PREV_PID, LTT_FIELD_NEXT_PID, LTT_FIELD_PREV_STATE,
after_schedchange_hook,
events_request,
if(ret) after_hn--;
ret = lttv_trace_find_hook(ts->parent.t,
- LTT_FACILITY_KERNEL, LTT_EVENT_PROCESS_FORK,
+ LTT_EVENT_PROCESS_FORK,
LTT_FIELD_PARENT_PID, LTT_FIELD_CHILD_PID, 0,
after_process_fork_hook,
events_request,
if(ret) after_hn--;
ret = lttv_trace_find_hook(ts->parent.t,
- LTT_FACILITY_KERNEL, LTT_EVENT_PROCESS_EXIT,
+ LTT_EVENT_PROCESS_EXIT,
LTT_FIELD_PID, 0, 0,
after_process_exit_hook,
events_request,
if(ret) after_hn--;
ret = lttv_trace_find_hook(ts->parent.t,
- LTT_FACILITY_FS, LTT_EVENT_EXEC,
+ LTT_EVENT_EXEC,
0, 0, 0,
after_fs_exec_hook,
events_request,
if(ret) after_hn--;
ret = lttv_trace_find_hook(ts->parent.t,
- LTT_FACILITY_USER_GENERIC, LTT_EVENT_THREAD_BRAND,
+ LTT_EVENT_THREAD_BRAND,
LTT_FIELD_NAME, 0, 0,
after_user_generic_thread_brand_hook,
events_request,
if(ret) after_hn--;
ret = lttv_trace_find_hook(ts->parent.t,
- LTT_FACILITY_LIST, LTT_EVENT_PROCESS_STATE,
+ LTT_EVENT_PROCESS_STATE,
LTT_FIELD_PID, LTT_FIELD_PARENT_PID, LTT_FIELD_NAME,
after_event_enum_process_hook,
events_request,
/* Add these hooks to each event_by_id hooks list */
/* add before */
for(k = 0 ; k < before_hn ; k++) {
- hook = &g_array_index(hooks, LttvTraceHook, k);
- for(l=0;l<hook->fac_list->len;l++) {
- thf = g_array_index(hook->fac_list, LttvTraceHookByFacility*, l);
- lttv_hooks_add(lttv_hooks_by_id_find(event_by_id, thf->id),
- thf->h,
- thf,
+ lttv_hooks_add(lttv_hooks_by_id_find(event_by_id, th->id),
+ th->h,
+ th,
LTTV_PRIO_STATE-5);
- }
}
/* add after */
for(k = before_hn ; k < after_hn ; k++) {
- hook = &g_array_index(hooks, LttvTraceHook, k);
- for(l=0;l<hook->fac_list->len;l++) {
- thf = g_array_index(hook->fac_list, LttvTraceHookByFacility*, l);
- lttv_hooks_add(lttv_hooks_by_id_find(event_by_id, thf->id),
- thf->h,
- thf,
+ lttv_hooks_add(lttv_hooks_by_id_find(event_by_id, th->id),
+ th->h,
+ th,
LTTV_PRIO_STATE+5);
- }
}
events_request->hooks = hooks;
#include <ltt/event.h>
#include <ltt/time.h>
-#include <ltt/type.h>
#include <ltt/trace.h>
#include <lttv/lttv.h>
int before_schedchange_hook(void *hook_data, void *call_data)
{
- LttvTraceHookByFacility *thf = (LttvTraceHookByFacility*)hook_data;
- EventsRequest *events_request = (EventsRequest*)thf->hook_data;
+ LttvTraceHook *th = (LttvTraceHook*)hook_data;
+ EventsRequest *events_request = (EventsRequest*)th->hook_data;
ControlFlowData *control_flow_data = events_request->viewer_data;
LttvTracefileContext *tfc = (LttvTracefileContext *)call_data;
guint pid_out;
guint pid_in;
{
- pid_out = ltt_event_get_long_unsigned(e, thf->f1);
- pid_in = ltt_event_get_long_unsigned(e, thf->f2);
+ pid_out = ltt_event_get_long_unsigned(e, th->f1);
+ pid_in = ltt_event_get_long_unsigned(e, th->f2);
}
tfc->target_pid = pid_out;
*/
int after_schedchange_hook(void *hook_data, void *call_data)
{
- LttvTraceHookByFacility *thf = (LttvTraceHookByFacility*)hook_data;
- EventsRequest *events_request = (EventsRequest*)thf->hook_data;
+ LttvTraceHook *th = (LttvTraceHook*)hook_data;
+ EventsRequest *events_request = (EventsRequest*)th->hook_data;
ControlFlowData *control_flow_data = events_request->viewer_data;
LttvTracefileContext *tfc = (LttvTracefileContext *)call_data;
guint pid_in;
{
guint pid_out;
- pid_out = ltt_event_get_long_unsigned(e, thf->f1);
- pid_in = ltt_event_get_long_unsigned(e, thf->f2);
+ pid_out = ltt_event_get_long_unsigned(e, th->f1);
+ pid_in = ltt_event_get_long_unsigned(e, th->f2);
}
int before_execmode_hook(void *hook_data, void *call_data)
{
- LttvTraceHookByFacility *thf = (LttvTraceHookByFacility*)hook_data;
- EventsRequest *events_request = (EventsRequest*)thf->hook_data;
+ LttvTraceHook *th = (LttvTraceHook*)hook_data;
+ EventsRequest *events_request = (EventsRequest*)th->hook_data;
ControlFlowData *control_flow_data = events_request->viewer_data;
LttvTracefileContext *tfc = (LttvTracefileContext *)call_data;
int before_process_exit_hook(void *hook_data, void *call_data)
{
- LttvTraceHookByFacility *thf = (LttvTraceHookByFacility*)hook_data;
- EventsRequest *events_request = (EventsRequest*)thf->hook_data;
+ LttvTraceHook *th = (LttvTraceHook*)hook_data;
+ EventsRequest *events_request = (EventsRequest*)th->hook_data;
ControlFlowData *control_flow_data = events_request->viewer_data;
int before_process_release_hook(void *hook_data, void *call_data)
{
- LttvTraceHookByFacility *thf = (LttvTraceHookByFacility*)hook_data;
- EventsRequest *events_request = (EventsRequest*)thf->hook_data;
+ LttvTraceHook *th = (LttvTraceHook*)hook_data;
+ EventsRequest *events_request = (EventsRequest*)th->hook_data;
ControlFlowData *control_flow_data = events_request->viewer_data;
guint pid;
{
- pid = ltt_event_get_long_unsigned(e, thf->f1);
+ pid = ltt_event_get_long_unsigned(e, th->f1);
}
/* Add process to process list (if not present) */
*/
int after_process_fork_hook(void *hook_data, void *call_data)
{
- LttvTraceHookByFacility *thf = (LttvTraceHookByFacility*)hook_data;
- EventsRequest *events_request = (EventsRequest*)thf->hook_data;
+ LttvTraceHook *th = (LttvTraceHook*)hook_data;
+ EventsRequest *events_request = (EventsRequest*)th->hook_data;
ControlFlowData *control_flow_data = events_request->viewer_data;
LttvTracefileContext *tfc = (LttvTracefileContext *)call_data;
guint child_pid;
{
- child_pid = ltt_event_get_long_unsigned(e, thf->f2);
+ child_pid = ltt_event_get_long_unsigned(e, th->f2);
}
/* Add process to process list (if not present) */
*/
int after_process_exit_hook(void *hook_data, void *call_data)
{
- LttvTraceHookByFacility *thf = (LttvTraceHookByFacility*)hook_data;
- EventsRequest *events_request = (EventsRequest*)thf->hook_data;
+ LttvTraceHook *th = (LttvTraceHook*)hook_data;
+ EventsRequest *events_request = (EventsRequest*)th->hook_data;
ControlFlowData *control_flow_data = events_request->viewer_data;
LttvTracefileContext *tfc = (LttvTracefileContext *)call_data;
/* Get the filename of the process to print */
int after_fs_exec_hook(void *hook_data, void *call_data)
{
- LttvTraceHookByFacility *thf = (LttvTraceHookByFacility*)hook_data;
- EventsRequest *events_request = (EventsRequest*)thf->hook_data;
+ LttvTraceHook *th = (LttvTraceHook*)hook_data;
+ EventsRequest *events_request = (EventsRequest*)th->hook_data;
ControlFlowData *control_flow_data = events_request->viewer_data;
LttvTracefileContext *tfc = (LttvTracefileContext *)call_data;
/* Get the filename of the process to print */
int after_user_generic_thread_brand_hook(void *hook_data, void *call_data)
{
- LttvTraceHookByFacility *thf = (LttvTraceHookByFacility*)hook_data;
- EventsRequest *events_request = (EventsRequest*)thf->hook_data;
+ LttvTraceHook *th = (LttvTraceHook*)hook_data;
+ EventsRequest *events_request = (EventsRequest*)th->hook_data;
ControlFlowData *control_flow_data = events_request->viewer_data;
LttvTracefileContext *tfc = (LttvTracefileContext *)call_data;
*/
int after_event_enum_process_hook(void *hook_data, void *call_data)
{
- LttvTraceHookByFacility *thf = (LttvTraceHookByFacility*)hook_data;
- EventsRequest *events_request = (EventsRequest*)thf->hook_data;
+ LttvTraceHook *th = (LttvTraceHook*)hook_data;
+ EventsRequest *events_request = (EventsRequest*)th->hook_data;
ControlFlowData *control_flow_data = events_request->viewer_data;
LttvTracefileContext *tfc = (LttvTracefileContext *)call_data;
guint pid_in;
{
- pid_in = ltt_event_get_long_unsigned(e, thf->f1);
+ pid_in = ltt_event_get_long_unsigned(e, th->f1);
}
if(pid_in == 0) {
*/
int before_statedump_end(void *hook_data, void *call_data)
{
- LttvTraceHookByFacility *thf = (LttvTraceHookByFacility*)hook_data;
- EventsRequest *events_request = (EventsRequest*)thf->hook_data;
+ LttvTraceHook *th = (LttvTraceHook*)hook_data;
+ EventsRequest *events_request = (EventsRequest*)th->hook_data;
ControlFlowData *control_flow_data = events_request->viewer_data;
LttvTracefileContext *tfc = (LttvTracefileContext *)call_data;
#include <ltt/ltt.h>
#include <ltt/event.h>
-#include <ltt/type.h>
#include <ltt/trace.h>
-#include <ltt/facility.h>
#include <lttv/module.h>
#include <lttv/hook.h>
#include <lttv/tracecontext.h>
TRACEFILE_NAME_COLUMN,
CPUID_COLUMN,
EVENT_COLUMN,
- FACILITY_COLUMN,
TIME_S_COLUMN,
TIME_NS_COLUMN,
PID_COLUMN,
gtk_tree_view_append_column (GTK_TREE_VIEW (event_viewer_data->tree_v),
column);
- renderer = gtk_cell_renderer_text_new ();
- column = gtk_tree_view_column_new_with_attributes ("Facility",
- renderer,
- "text", FACILITY_COLUMN,
- NULL);
- gtk_tree_view_column_set_alignment (column, 0.0);
- gtk_tree_view_column_set_fixed_width (column, 120);
- gtk_tree_view_append_column (GTK_TREE_VIEW (event_viewer_data->tree_v),
- column);
-
renderer = gtk_cell_renderer_text_new ();
column = gtk_tree_view_column_new_with_attributes ("Time (s)",
renderer,
return FALSE;
- LttFacility *facility = ltt_event_facility(e);
- LttEventType *event_type = ltt_event_eventtype(e);
+// LttFacility *facility = ltt_event_facility(e);
+// LttEventType *event_type = ltt_event_eventtype(e);
LttTime time = ltt_event_time(e);
guint cpu = tfs->cpu;
TRACE_NAME_COLUMN, g_quark_to_string(ltt_trace_name(tfc->t_context->t)),
TRACEFILE_NAME_COLUMN, g_quark_to_string(ltt_tracefile_name(tfc->tf)),
CPUID_COLUMN, cpu,
- FACILITY_COLUMN, g_quark_to_string(ltt_facility_name(facility)),
- EVENT_COLUMN, g_quark_to_string(ltt_eventtype_name(event_type)),
+ EVENT_COLUMN, g_quark_to_string(marker_get_info_from_id(tfc->tf->trace, e->event_id)->name),
TIME_S_COLUMN, time.tv_sec,
TIME_NS_COLUMN, time.tv_nsec,
PID_COLUMN, process->pid,
#include <string.h>
#include <ltt/ltt.h>
#include <ltt/event.h>
-#include <ltt/type.h>
#include <ltt/trace.h>
-#include <ltt/facility.h>
#include <lttv/module.h>
#include <lttv/hook.h>
#include <lttv/tracecontext.h>
#include <ltt/event.h>
#include <ltt/time.h>
-#include <ltt/type.h>
#include <ltt/trace.h>
#include <lttv/lttv.h>
#include <string.h>
#include <ltt/ltt.h>
#include <ltt/event.h>
-#include <ltt/type.h>
#include <ltt/trace.h>
-#include <ltt/facility.h>
#include <lttv/module.h>
#include <lttv/hook.h>
#include <lttv/tracecontext.h>
LttvTraceHook *hook;
- LttvTraceHookByFacility *thf;
+ LttvTraceHook *th;
guint ret;
gint before_hn, after_hn;
/* before hooks */
// ret = lttv_trace_find_hook(ts->parent.t,
-// LTT_FACILITY_KERNEL_ARCH, LTT_EVENT_SYSCALL_ENTRY,
+// LTT_EVENT_SYSCALL_ENTRY,
// LTT_FIELD_SYSCALL_ID, 0, 0,
// before_execmode_hook,
// events_request,
// if(ret) before_hn--;
//
// ret = lttv_trace_find_hook(ts->parent.t,
-// LTT_FACILITY_KERNEL_ARCH, LTT_EVENT_SYSCALL_EXIT,
+// LTT_EVENT_SYSCALL_EXIT,
// 0, 0, 0,
// before_execmode_hook,
// events_request,
// if(ret) before_hn--;
//
ret = lttv_trace_find_hook(ts->parent.t,
- LTT_FACILITY_KERNEL_ARCH, LTT_EVENT_TRAP_ENTRY,
+ LTT_EVENT_TRAP_ENTRY,
LTT_FIELD_TRAP_ID, 0, 0,
before_execmode_hook,
events_request,
if(ret) before_hn--;
ret = lttv_trace_find_hook(ts->parent.t,
- LTT_FACILITY_KERNEL_ARCH, LTT_EVENT_TRAP_EXIT,
+ LTT_EVENT_TRAP_EXIT,
0, 0, 0,
before_execmode_hook,
events_request,
if(ret) before_hn--;
ret = lttv_trace_find_hook(ts->parent.t,
- LTT_FACILITY_KERNEL, LTT_EVENT_IRQ_ENTRY,
+ LTT_EVENT_IRQ_ENTRY,
LTT_FIELD_IRQ_ID, 0, 0,
before_execmode_hook,
events_request,
if(ret) before_hn--;
ret = lttv_trace_find_hook(ts->parent.t,
- LTT_FACILITY_KERNEL, LTT_EVENT_IRQ_EXIT,
+ LTT_EVENT_IRQ_EXIT,
0, 0, 0,
before_execmode_hook,
events_request,
if(ret) before_hn--;
//
// ret = lttv_trace_find_hook(ts->parent.t,
-// LTT_FACILITY_KERNEL, LTT_EVENT_SOFT_IRQ_ENTRY,
+// LTT_EVENT_SOFT_IRQ_ENTRY,
// LTT_FIELD_SOFT_IRQ_ID, 0, 0,
// before_execmode_hook,
// events_request,
// if(ret) before_hn--;
//
// ret = lttv_trace_find_hook(ts->parent.t,
-// LTT_FACILITY_KERNEL, LTT_EVENT_SOFT_IRQ_EXIT,
+// LTT_EVENT_SOFT_IRQ_EXIT,
// 0, 0, 0,
// before_execmode_hook,
// events_request,
ret = lttv_trace_find_hook(ts->parent.t,
- LTT_FACILITY_KERNEL, LTT_EVENT_SCHED_SCHEDULE,
+ LTT_EVENT_SCHED_SCHEDULE,
LTT_FIELD_PREV_PID, LTT_FIELD_NEXT_PID, LTT_FIELD_PREV_STATE,
before_schedchange_hook,
events_request,
if(ret) before_hn--;
// ret = lttv_trace_find_hook(ts->parent.t,
-// LTT_FACILITY_KERNEL, LTT_EVENT_PROCESS_EXIT,
+// LTT_EVENT_PROCESS_EXIT,
// LTT_FIELD_PID, 0, 0,
// before_process_exit_hook,
// events_request,
// if(ret) before_hn--;
//
// ret = lttv_trace_find_hook(ts->parent.t,
-// LTT_FACILITY_KERNEL, LTT_EVENT_PROCESS_FREE,
+// LTT_EVENT_PROCESS_FREE,
// LTT_FIELD_PID, 0, 0,
// before_process_release_hook,
// events_request,
// if(ret) before_hn--;
//
// ret = lttv_trace_find_hook(ts->parent.t,
-// LTT_FACILITY_LIST, LTT_EVENT_STATEDUMP_END,
+// LTT_EVENT_STATEDUMP_END,
// 0, 0, 0,
// before_statedump_end,
// events_request,
// if(ret) before_hn--;
ret = lttv_trace_find_hook(ts->parent.t,
- LTT_FACILITY_BLOCK, LTT_EVENT_REQUEST_ISSUE,
+ LTT_EVENT_REQUEST_ISSUE,
LTT_FIELD_MAJOR, LTT_FIELD_MINOR, LTT_FIELD_OPERATION,
before_bdev_event_hook,
events_request,
if(ret) before_hn--;
ret = lttv_trace_find_hook(ts->parent.t,
- LTT_FACILITY_BLOCK, LTT_EVENT_REQUEST_COMPLETE,
+ LTT_EVENT_REQUEST_COMPLETE,
LTT_FIELD_MAJOR, LTT_FIELD_MINOR, LTT_FIELD_OPERATION,
before_bdev_event_hook,
events_request,
after_hn = before_hn;
ret = lttv_trace_find_hook(ts->parent.t,
- LTT_FACILITY_KERNEL, LTT_EVENT_SCHED_SCHEDULE,
+ LTT_EVENT_SCHED_SCHEDULE,
LTT_FIELD_PREV_PID, LTT_FIELD_NEXT_PID, LTT_FIELD_PREV_STATE,
after_schedchange_hook,
events_request,
if(ret) after_hn--;
// ret = lttv_trace_find_hook(ts->parent.t,
-// LTT_FACILITY_KERNEL, LTT_EVENT_PROCESS_FORK,
+// LTT_EVENT_PROCESS_FORK,
// LTT_FIELD_PARENT_PID, LTT_FIELD_CHILD_PID, 0,
// after_process_fork_hook,
// events_request,
// if(ret) after_hn--;
//
// ret = lttv_trace_find_hook(ts->parent.t,
-// LTT_FACILITY_KERNEL, LTT_EVENT_PROCESS_EXIT,
+// LTT_EVENT_PROCESS_EXIT,
// LTT_FIELD_PID, 0, 0,
// after_process_exit_hook,
// events_request,
// if(ret) after_hn--;
//
// ret = lttv_trace_find_hook(ts->parent.t,
-// LTT_FACILITY_FS, LTT_EVENT_EXEC,
+// LTT_EVENT_EXEC,
// 0, 0, 0,
// after_fs_exec_hook,
// events_request,
// if(ret) after_hn--;
//
// ret = lttv_trace_find_hook(ts->parent.t,
-// LTT_FACILITY_USER_GENERIC, LTT_EVENT_THREAD_BRAND,
+// LTT_EVENT_THREAD_BRAND,
// LTT_FIELD_NAME, 0, 0,
// after_user_generic_thread_brand_hook,
// events_request,
// if(ret) after_hn--;
//
// ret = lttv_trace_find_hook(ts->parent.t,
-// LTT_FACILITY_LIST, LTT_EVENT_PROCESS_STATE,
+// LTT_EVENT_PROCESS_STATE,
// LTT_FIELD_PID, LTT_FIELD_PARENT_PID, LTT_FIELD_NAME,
// after_event_enum_process_hook,
// events_request,
/* add before */
for(k = 0 ; k < before_hn ; k++) {
hook = &g_array_index(hooks, LttvTraceHook, k);
- for(l=0;l<hook->fac_list->len;l++) {
- thf = g_array_index(hook->fac_list, LttvTraceHookByFacility*, l);
- lttv_hooks_add(lttv_hooks_by_id_find(event_by_id, thf->id),
+ lttv_hooks_add(lttv_hooks_by_id_find(event_by_id, thf->id),
thf->h,
thf,
LTTV_PRIO_STATE-5);
- }
}
/* add after */
#include <ltt/event.h>
#include <ltt/time.h>
-#include <ltt/type.h>
#include <ltt/trace.h>
#include <lttv/lttv.h>
int before_schedchange_hook(void *hook_data, void *call_data)
{
- LttvTraceHookByFacility *thf = (LttvTraceHookByFacility*)hook_data;
- EventsRequest *events_request = (EventsRequest*)thf->hook_data;
+ LttvTraceHook *th = (LttvTraceHook*)hook_data;
+ EventsRequest *events_request = (EventsRequest*)th->hook_data;
ControlFlowData *control_flow_data = events_request->viewer_data;
LttvTracefileContext *tfc = (LttvTracefileContext *)call_data;
guint pid_out;
guint pid_in;
- pid_out = ltt_event_get_long_unsigned(e, thf->f1);
- pid_in = ltt_event_get_long_unsigned(e, thf->f2);
+ pid_out = ltt_event_get_long_unsigned(e, th->f1);
+ pid_in = ltt_event_get_long_unsigned(e, th->f2);
// if(pid_in != 0 && pid_out != 0) {
// /* not a transition to/from idle */
// return 0;
*/
int after_schedchange_hook(void *hook_data, void *call_data)
{
- LttvTraceHookByFacility *thf = (LttvTraceHookByFacility*)hook_data;
- EventsRequest *events_request = (EventsRequest*)thf->hook_data;
+ LttvTraceHook *th = (LttvTraceHook*)hook_data;
+ EventsRequest *events_request = (EventsRequest*)th->hook_data;
ControlFlowData *control_flow_data = events_request->viewer_data;
LttvTracefileContext *tfc = (LttvTracefileContext *)call_data;
guint pid_in;
{
guint pid_out;
- pid_out = ltt_event_get_long_unsigned(e, thf->f1);
- pid_in = ltt_event_get_long_unsigned(e, thf->f2);
+ pid_out = ltt_event_get_long_unsigned(e, th->f1);
+ pid_in = ltt_event_get_long_unsigned(e, th->f2);
}
int before_execmode_hook(void *hook_data, void *call_data)
{
- LttvTraceHookByFacility *thf = (LttvTraceHookByFacility*)hook_data;
- EventsRequest *events_request = (EventsRequest*)thf->hook_data;
+ LttvTraceHook *th = (LttvTraceHook*)hook_data;
+ EventsRequest *events_request = (EventsRequest*)th->hook_data;
ControlFlowData *control_flow_data = events_request->viewer_data;
LttvTracefileContext *tfc = (LttvTracefileContext *)call_data;
int before_execmode_hook_irq(void *hook_data, void *call_data)
{
- LttvTraceHookByFacility *thf = (LttvTraceHookByFacility*)hook_data;
- EventsRequest *events_request = (EventsRequest*)thf->hook_data;
+ LttvTraceHook *th = (LttvTraceHook*)hook_data;
+ EventsRequest *events_request = (EventsRequest*)th->hook_data;
ControlFlowData *control_flow_data = events_request->viewer_data;
LttvTracefileContext *tfc = (LttvTracefileContext *)call_data;
guint8 ev_id_exit = ltt_eventtype_id(ltt_facility_eventtype_get_by_name(ev_facility, LTT_EVENT_IRQ_EXIT));
if(ltt_facility_name(ev_facility) == LTT_FACILITY_KERNEL &&
ev_id_entry == ltt_event_eventtype_id(e)) {
- irq = ltt_event_get_long_unsigned(e, thf->f1);
+ irq = ltt_event_get_long_unsigned(e, th->f1);
}
else if(ltt_facility_name(ev_facility) == LTT_FACILITY_KERNEL &&
ev_id_exit == ltt_event_eventtype_id(e)) {
int before_bdev_event_hook(void *hook_data, void *call_data)
{
- LttvTraceHookByFacility *thf = (LttvTraceHookByFacility*)hook_data;
- EventsRequest *events_request = (EventsRequest*)thf->hook_data;
+ LttvTraceHook *th = (LttvTraceHook*)hook_data;
+ EventsRequest *events_request = (EventsRequest*)th->hook_data;
ControlFlowData *control_flow_data = events_request->viewer_data;
LttvTracefileContext *tfc = (LttvTracefileContext *)call_data;
/* For the pid */
guint cpu = tfs->cpu;
- guint8 major = ltt_event_get_long_unsigned(e, thf->f1);
- guint8 minor = ltt_event_get_long_unsigned(e, thf->f2);
- guint oper = ltt_event_get_long_unsigned(e, thf->f3);
+ guint8 major = ltt_event_get_long_unsigned(e, th->f1);
+ guint8 minor = ltt_event_get_long_unsigned(e, th->f2);
+ guint oper = ltt_event_get_long_unsigned(e, th->f3);
gint devcode_gint = MKDEV(major,minor);
{
*/
int before_statedump_end(void *hook_data, void *call_data)
{
- LttvTraceHookByFacility *thf = (LttvTraceHookByFacility*)hook_data;
- EventsRequest *events_request = (EventsRequest*)thf->hook_data;
+ LttvTraceHook *th = (LttvTraceHook*)hook_data;
+ EventsRequest *events_request = (EventsRequest*)th->hook_data;
ControlFlowData *control_flow_data = events_request->viewer_data;
LttvTracefileContext *tfc = (LttvTracefileContext *)call_data;
#include <ltt/ltt.h>
#include <ltt/event.h>
-#include <ltt/type.h>
#include <ltt/trace.h>
#include <lttv/lttv.h>
#include <string.h>
#include <ltt/ltt.h>
#include <ltt/event.h>
-#include <ltt/type.h>
#include <ltt/trace.h>
-#include <ltt/facility.h>
#include <lttv/module.h>
#include <lttv/hook.h>
#include <lttv/tracecontext.h>