From: compudj Date: Tue, 27 Jan 2009 20:54:19 +0000 (+0000) Subject: update lttv page fault handling X-Git-Tag: v0.12.20~193 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=4e9bbbd3482f2dfe0a58b85c7c15f646a42afc94;p=lttv.git update lttv page fault handling git-svn-id: http://ltt.polymtl.ca/svn@3296 04897980-b3bd-0310-b5e0-8ef037075253 --- diff --git a/trunk/lttv/configure.in b/trunk/lttv/configure.in index a25ef55a..eb251dda 100644 --- a/trunk/lttv/configure.in +++ b/trunk/lttv/configure.in @@ -23,7 +23,7 @@ AC_PREREQ(2.57) AC_INIT(FULL-PACKAGE-NAME, VERSION, BUG-REPORT-ADDRESS) #AC_WITH_LTDL # not needed ? -AM_INIT_AUTOMAKE(lttv,0.12.7-20012009) +AM_INIT_AUTOMAKE(lttv,0.12.8-27012009) AM_CONFIG_HEADER(config.h) AM_PROG_LIBTOOL diff --git a/trunk/lttv/doc/developer/lttng-lttv-compatibility.html b/trunk/lttv/doc/developer/lttng-lttv-compatibility.html index bea4afc8..ef48bec3 100644 --- a/trunk/lttv/doc/developer/lttng-lttv-compatibility.html +++ b/trunk/lttv/doc/developer/lttng-lttv-compatibility.html @@ -3311,6 +3311,52 @@ powerpc64, s390, sparc, sparc64.
+ + +0.12.8
+ + +0.87
+ + +0.60
+0.61
+0.62
+0.63
+0.64
+ + +obsolete
+ + +0.6
+ + +obsolete
+ + +2.3
+ + +2.6.28.2
+ + +LTTng 0.87 combines 4 page fault events into 2. This is a very high-speed +tracing path.
+LTTV 0.12.8 supports LTTng 0.87.
+ + + + +x86, alpha, arm26, avr32, cris, frv, h8300, m32r, m68knommu, parisc, sh, sh64, +um, v850, xtensa.
+arm, i686, ia64, m68k, mips, mipsel, x86_64, powerpc 405, +powerpc64, s390, sparc, sparc64.
+ + + + + diff --git a/trunk/lttv/lttv/lttv/state.c b/trunk/lttv/lttv/lttv/state.c index e6278ac8..8f975507 100644 --- a/trunk/lttv/lttv/lttv/state.c +++ b/trunk/lttv/lttv/lttv/state.c @@ -70,6 +70,10 @@ GQuark GQuark LTT_EVENT_SYSCALL_ENTRY, LTT_EVENT_SYSCALL_EXIT, + LTT_EVENT_PAGE_FAULT_NOSEM_ENTRY, + LTT_EVENT_PAGE_FAULT_NOSEM_EXIT, + LTT_EVENT_PAGE_FAULT_ENTRY, + LTT_EVENT_PAGE_FAULT_EXIT, LTT_EVENT_TRAP_ENTRY, LTT_EVENT_TRAP_EXIT, LTT_EVENT_IRQ_ENTRY, @@ -3421,6 +3425,30 @@ void lttv_state_add_event_hooks(LttvTracesetState *self) NULL, trap_exit, NULL, &hooks); + lttv_trace_find_hook(ts->parent.t, + LTT_CHANNEL_KERNEL, + LTT_EVENT_PAGE_FAULT_ENTRY, + FIELD_ARRAY(LTT_FIELD_TRAP_ID), + trap_entry, NULL, &hooks); + + lttv_trace_find_hook(ts->parent.t, + LTT_CHANNEL_KERNEL, + LTT_EVENT_PAGE_FAULT_EXIT, + NULL, + trap_exit, NULL, &hooks); + + lttv_trace_find_hook(ts->parent.t, + LTT_CHANNEL_KERNEL, + LTT_EVENT_PAGE_FAULT_NOSEM_ENTRY, + FIELD_ARRAY(LTT_FIELD_TRAP_ID), + trap_entry, NULL, &hooks); + + lttv_trace_find_hook(ts->parent.t, + LTT_CHANNEL_KERNEL, + LTT_EVENT_PAGE_FAULT_NOSEM_EXIT, + NULL, + trap_exit, NULL, &hooks); + lttv_trace_find_hook(ts->parent.t, LTT_CHANNEL_KERNEL, LTT_EVENT_IRQ_ENTRY, @@ -4230,6 +4258,10 @@ static void module_init() LTT_EVENT_SYSCALL_EXIT = g_quark_from_string("syscall_exit"); LTT_EVENT_TRAP_ENTRY = g_quark_from_string("trap_entry"); LTT_EVENT_TRAP_EXIT = g_quark_from_string("trap_exit"); + LTT_EVENT_PAGE_FAULT_ENTRY = g_quark_from_string("page_fault_entry"); + LTT_EVENT_PAGE_FAULT_EXIT = g_quark_from_string("page_fault_exit"); + LTT_EVENT_PAGE_FAULT_NOSEM_ENTRY = g_quark_from_string("page_fault_nosem_entry"); + LTT_EVENT_PAGE_FAULT_NOSEM_EXIT = g_quark_from_string("page_fault_nosem_exit"); LTT_EVENT_IRQ_ENTRY = g_quark_from_string("irq_entry"); LTT_EVENT_IRQ_EXIT = g_quark_from_string("irq_exit"); LTT_EVENT_SOFT_IRQ_RAISE = g_quark_from_string("softirq_raise"); diff --git a/trunk/lttv/lttv/lttv/state.h b/trunk/lttv/lttv/lttv/state.h index b24badbb..8c5fc040 100644 --- a/trunk/lttv/lttv/lttv/state.h +++ b/trunk/lttv/lttv/lttv/state.h @@ -79,6 +79,10 @@ extern GQuark LTT_EVENT_SYSCALL_EXIT, LTT_EVENT_TRAP_ENTRY, LTT_EVENT_TRAP_EXIT, + LTT_EVENT_PAGE_FAULT_ENTRY, + LTT_EVENT_PAGE_FAULT_EXIT, + LTT_EVENT_PAGE_FAULT_NOSEM_ENTRY, + LTT_EVENT_PAGE_FAULT_NOSEM_EXIT, LTT_EVENT_IRQ_ENTRY, LTT_EVENT_IRQ_EXIT, LTT_EVENT_SOFT_IRQ_RAISE, diff --git a/trunk/lttv/lttv/modules/gui/controlflow/drawing.c b/trunk/lttv/lttv/modules/gui/controlflow/drawing.c index 46c83b6e..3d74b502 100644 --- a/trunk/lttv/lttv/modules/gui/controlflow/drawing.c +++ b/trunk/lttv/lttv/modules/gui/controlflow/drawing.c @@ -253,6 +253,38 @@ void drawing_data_request(Drawing_t *drawing, events_request, &hooks); + lttv_trace_find_hook(ts->parent.t, + LTT_CHANNEL_KERNEL, + LTT_EVENT_PAGE_FAULT_ENTRY, + FIELD_ARRAY(LTT_FIELD_TRAP_ID), + before_execmode_hook, + events_request, + &hooks); + + lttv_trace_find_hook(ts->parent.t, + LTT_CHANNEL_KERNEL, + LTT_EVENT_PAGE_FAULT_EXIT, + NULL, + before_execmode_hook, + events_request, + &hooks); + + lttv_trace_find_hook(ts->parent.t, + LTT_CHANNEL_KERNEL, + LTT_EVENT_PAGE_FAULT_NOSEM_ENTRY, + FIELD_ARRAY(LTT_FIELD_TRAP_ID), + before_execmode_hook, + events_request, + &hooks); + + lttv_trace_find_hook(ts->parent.t, + LTT_CHANNEL_KERNEL, + LTT_EVENT_PAGE_FAULT_NOSEM_EXIT, + NULL, + before_execmode_hook, + events_request, + &hooks); + lttv_trace_find_hook(ts->parent.t, LTT_CHANNEL_KERNEL, LTT_EVENT_IRQ_ENTRY, diff --git a/trunk/lttv/lttv/modules/gui/resourceview/drawing.c b/trunk/lttv/lttv/modules/gui/resourceview/drawing.c index 2d3b4a1b..033475ad 100644 --- a/trunk/lttv/lttv/modules/gui/resourceview/drawing.c +++ b/trunk/lttv/lttv/modules/gui/resourceview/drawing.c @@ -279,6 +279,38 @@ void drawing_data_request(Drawing_t *drawing, events_request, &hooks); + lttv_trace_find_hook(ts->parent.t, + LTT_CHANNEL_KERNEL, + LTT_EVENT_PAGE_FAULT_ENTRY, + FIELD_ARRAY(LTT_FIELD_TRAP_ID), + before_execmode_hook, + events_request, + &hooks); + + lttv_trace_find_hook(ts->parent.t, + LTT_CHANNEL_KERNEL, + LTT_EVENT_PAGE_FAULT_EXIT, + NULL, + before_execmode_hook, + events_request, + &hooks); + + lttv_trace_find_hook(ts->parent.t, + LTT_CHANNEL_KERNEL, + LTT_EVENT_PAGE_FAULT_NOSEM_ENTRY, + FIELD_ARRAY(LTT_FIELD_TRAP_ID), + before_execmode_hook, + events_request, + &hooks); + + lttv_trace_find_hook(ts->parent.t, + LTT_CHANNEL_KERNEL, + LTT_EVENT_PAGE_FAULT_NOSEM_EXIT, + NULL, + before_execmode_hook, + events_request, + &hooks); + lttv_trace_find_hook(ts->parent.t, LTT_CHANNEL_KERNEL, LTT_EVENT_IRQ_ENTRY, diff --git a/trunk/lttv/lttv/modules/gui/resourceview/eventhooks.c b/trunk/lttv/lttv/modules/gui/resourceview/eventhooks.c index d0c87f6a..563fc613 100644 --- a/trunk/lttv/lttv/modules/gui/resourceview/eventhooks.c +++ b/trunk/lttv/lttv/modules/gui/resourceview/eventhooks.c @@ -1186,15 +1186,20 @@ int before_execmode_hook_trap(void *hook_data, void *call_data) /* * Check for LTT_CHANNEL_KERNEL channel name and event ID - * corresponding to LTT_EVENT_TRAP_ENTRY or LTT_EVENT_TRAP_EXIT. + * corresponding to LTT_EVENT_TRAP/PAGE_FAULT_ENTRY or + * LTT_EVENT_TRAP/PAGE_FAULT_EXIT. */ if (tfc->tf->name != LTT_CHANNEL_KERNEL) return 0; minfo = marker_get_info_from_id(tfc->tf->mdata, e->event_id); g_assert(minfo != NULL); - if (minfo->name == LTT_EVENT_TRAP_ENTRY) { + if (minfo->name == LTT_EVENT_TRAP_ENTRY + || minfo->name == LTT_EVENT_PAGE_FAULT_ENTRY + || minfo->name == LTT_EVENT_PAGE_FAULT_NOSEM_ENTRY) { trap = ltt_event_get_long_unsigned(e, lttv_trace_get_hook_field(th, 0)); - } else if (minfo->name == LTT_EVENT_TRAP_EXIT) { + } else if (minfo->name == LTT_EVENT_TRAP_EXIT + || minfo->name == LTT_EVENT_PAGE_FAULT_EXIT + || minfo->name == LTT_EVENT_PAGE_FAULT_NOSEM_EXIT) { trap = ts->cpu_states[cpu].last_trap; } else return 0;