From: Greg Kroah-Hartman Date: Tue, 24 Aug 2010 20:19:00 +0000 (-0700) Subject: .34 patches X-Git-Tag: v2.6.32.21~5 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=fda3179e2afdb92e2e5fa307d63c6f6dd4f07f75;p=thirdparty%2Fkernel%2Fstable-queue.git .34 patches --- diff --git a/queue-2.6.34/series b/queue-2.6.34/series index cf81eb43e89..5c771bfdeae 100644 --- a/queue-2.6.34/series +++ b/queue-2.6.34/series @@ -87,3 +87,4 @@ usb-io_ti-check-firmware-version-before-updating.patch usb-xhci-remove-buggy-assignment-in-next_trb.patch usb-ftdi_sio-add-id-for-ionics-plugcomputer.patch usb-ftdi_sio-add-product-id-for-lenz-li-usb.patch +tracing-fix-timer-tracing.patch diff --git a/queue-2.6.34/tracing-fix-timer-tracing.patch b/queue-2.6.34/tracing-fix-timer-tracing.patch new file mode 100644 index 00000000000..518dc91a917 --- /dev/null +++ b/queue-2.6.34/tracing-fix-timer-tracing.patch @@ -0,0 +1,75 @@ +From ede1b4290781ae82ccf0f2ecc6dada8d3dd35779 Mon Sep 17 00:00:00 2001 +From: Arjan van de Ven +Date: Wed, 18 Aug 2010 15:33:13 -0700 +Subject: tracing: Fix timer tracing + +From: Arjan van de Ven + +commit ede1b4290781ae82ccf0f2ecc6dada8d3dd35779 upstream. + +PowerTOP would like to be able to trace timers. + +Unfortunately, the current timer tracing is not very useful: the +actual timer function is not recorded in the trace at the start +of timer execution. + +Although this is recorded for timer "start" time (when it gets +armed), this is not useful; most timers get started early, and a +tracer like PowerTOP will never see this event, but will only +see the actual running of the timer. + +This patch just adds the function to the timer tracing; I've +verified with PowerTOP that now it can get useful information +about timers. + +Signed-off-by: Arjan van de Ven +Cc: xiaoguangrong@cn.fujitsu.com +Cc: Steven Rostedt +Cc: Frederic Weisbecker +Cc: Peter Zijlstra +LKML-Reference: <4C6C5FA9.3000405@linux.intel.com> +Signed-off-by: Ingo Molnar +Signed-off-by: Greg Kroah-Hartman + +--- + include/trace/events/timer.h | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +--- a/include/trace/events/timer.h ++++ b/include/trace/events/timer.h +@@ -74,14 +74,16 @@ TRACE_EVENT(timer_expire_entry, + TP_STRUCT__entry( + __field( void *, timer ) + __field( unsigned long, now ) ++ __field( void *, function) + ), + + TP_fast_assign( + __entry->timer = timer; + __entry->now = jiffies; ++ __entry->function = timer->function; + ), + +- TP_printk("timer=%p now=%lu", __entry->timer, __entry->now) ++ TP_printk("timer=%p function=%pf now=%lu", __entry->timer, __entry->function,__entry->now) + ); + + /** +@@ -213,14 +215,16 @@ TRACE_EVENT(hrtimer_expire_entry, + TP_STRUCT__entry( + __field( void *, hrtimer ) + __field( s64, now ) ++ __field( void *, function) + ), + + TP_fast_assign( + __entry->hrtimer = hrtimer; + __entry->now = now->tv64; ++ __entry->function = hrtimer->function; + ), + +- TP_printk("hrtimer=%p now=%llu", __entry->hrtimer, ++ TP_printk("hrtimer=%p function=%pf now=%llu", __entry->hrtimer, __entry->function, + (unsigned long long)ktime_to_ns((ktime_t) { .tv64 = __entry->now })) + ); +