lkml.org 
[lkml]   [2012]   [May]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] power, trace: add tracing for device_resume
From
Date
On Fri, 2012-05-18 at 13:58 -0700, Sameer Nanda wrote:
> On Fri, May 18, 2012 at 12:14 PM, Steven Rostedt <rostedt@goodmis.org> wrote:
> > On Fri, 2012-05-18 at 11:57 -0700, Sameer Nanda wrote:
> >
> >> AFAICT, they are used for something completely different -- help solve
> >> suspend/resume issues by saving a hash in the RTC of the last device
> >> that suspended/resumed. They don't use the perf tracing mechanism at
> >> all.
> >>
> >
> > Also note that all tracepoints have timestamps attached to them. You do
> > not need to add deltas. Do that in the userspace tools that read the
> > timestamps and events. This way you can have one DECLARE_EVENT_CLASS and
> > three DEFINE_EVENTs. This will save space.
>
> Agreed on the space savings. However, with the time_delta in the
> trace message itself, a one line shell script [1] that sorts on the
> time_delta field is sufficient to quickly spot the devices that take a
> long time to resume. Without the time_delta field, the user tool is
> more complex since it needs to first match up the device_resume_in,
> device_resume_waited and device_resume_out traces and then calculate
> time deltas.
>
> Seems like a worthwhile trade-off to me but I can take out the
> time_delta if the general consensus is otherwise.

Just note that every TRACE_EVENT() adds around 5k or more code. Every
DEFINE_EVENT adds just about 300 bytes.

> [1]: here's an example script I use for sorting the device resume times:
> cat /sys/kernel/debug/tracing/trace | grep device_resume_out | awk
> 'BEGIN { FS = "time_delta=" } ; { print $2 $0 }' | sort -n
>

Question is, how often is this done? And that 5k is permanent for all
users.

-- Steve




\
 
 \ /
  Last update: 2012-05-18 23:41    [W:0.111 / U:1.004 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site