From: Steven Rostedt <rostedt@goodmis.org>
To: Sameer Nanda <snanda@chromium.org>
Cc: Greg KH <gregkh@linuxfoundation.org>,
rob@landley.net, len.brown@intel.com, pavel@ucw.cz, rjw@sisk.pl,
fweisbec@gmail.com, mingo@redhat.com, jkosina@suse.cz,
standby24x7@gmail.com, jj@chaosbits.net,
paulmck@linux.vnet.ibm.com, josh@joshtriplett.org,
linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-pm@vger.kernel.org
Subject: Re: [PATCH] power, trace: add tracing for device_resume
Date: Fri, 18 May 2012 17:19:06 -0400 [thread overview]
Message-ID: <1337375946.7562.11.camel@gandalf.stny.rr.com> (raw)
In-Reply-To: <CANMivWbXVVd=wVqzC=FTDp7Pe3YtzR+0UcRPCPAmPN9uUV83RA@mail.gmail.com>
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
next prev parent reply other threads:[~2012-05-18 21:19 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-18 18:27 Sameer Nanda
2012-05-18 18:37 ` Greg KH
2012-05-18 18:57 ` Sameer Nanda
2012-05-18 19:14 ` Steven Rostedt
2012-05-18 20:58 ` Sameer Nanda
2012-05-18 21:19 ` Steven Rostedt [this message]
2012-05-18 21:39 ` Sameer Nanda
2012-05-18 21:46 ` Rafael J. Wysocki
2012-05-18 22:17 ` Sameer Nanda
2012-05-18 23:01 ` Greg KH
2012-05-18 23:15 ` Sameer Nanda
2012-05-19 11:59 ` Rafael J. Wysocki
2012-05-19 16:32 ` Greg KH
2012-05-19 19:30 ` Rafael J. Wysocki
2012-05-22 19:18 ` Sameer Nanda
2012-05-19 0:24 ` Steven Rostedt
2012-05-18 21:27 ` Rafael J. Wysocki
2012-05-22 19:16 ` [PATCH] power: add knob for printing device resume times Sameer Nanda
2012-05-22 20:24 ` Greg KH
2012-05-23 16:45 ` [PATCH v2] " Sameer Nanda
2012-06-04 22:41 ` Sameer Nanda
2012-06-05 6:26 ` Greg KH
2012-06-10 11:25 ` Pavel Machek
2012-06-15 0:19 ` Greg KH
2012-06-15 10:00 ` Rafael J. Wysocki
2012-06-15 14:09 ` Greg KH
2012-06-16 13:57 ` Rafael J. Wysocki
2012-06-16 20:36 ` [PATCH] (was: Re: [PATCH v2] power: add knob for printing device resume times) Rafael J. Wysocki
2012-06-18 1:26 ` Greg KH
2012-06-18 5:45 ` Srivatsa S. Bhat
2012-06-28 21:29 ` Sameer Nanda
2012-08-16 14:03 ` [PATCH v2] power: add knob for printing device resume times Pavel Machek
2012-05-24 10:27 ` [PATCH] " Pavel Machek
2012-05-29 17:08 ` Sameer Nanda
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1337375946.7562.11.camel@gandalf.stny.rr.com \
--to=rostedt@goodmis.org \
--cc=fweisbec@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=jj@chaosbits.net \
--cc=jkosina@suse.cz \
--cc=josh@joshtriplett.org \
--cc=len.brown@intel.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=paulmck@linux.vnet.ibm.com \
--cc=pavel@ucw.cz \
--cc=rjw@sisk.pl \
--cc=rob@landley.net \
--cc=snanda@chromium.org \
--cc=standby24x7@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®