linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Binoy Jayan <binoy.jayan@linaro.org>
Cc: Ingo Molnar <mingo@redhat.com>,
	Daniel Wagner <daniel.wagner@bmw-carit.de>,
	Arnd Bergmann <arnd@arndb.de>,
	linux-kernel@vger.kernel.org,
	Masami <masami.hiramatsu@linaro.org>
Subject: Re: [PATCH v4 2/3] tracing: Add trace_irqsoff tracepoints
Date: Tue, 30 Aug 2016 10:08:38 -0400	[thread overview]
Message-ID: <20160830100838.05d4b87e@gandalf.local.home> (raw)
In-Reply-To: <1472552924-22297-3-git-send-email-binoy.jayan@linaro.org>

On Tue, 30 Aug 2016 15:58:43 +0530
Binoy Jayan <binoy.jayan@linaro.org> wrote:

> This work is based on work by Daniel Wagner. A few tracepoints are added
> at the end of the critical section. With the hist trigger in place, the
> hist trigger plots may be generated, with per-cpu breakdown of events
> captured. It is based on linux kernel's event infrastructure.
> 
> The following filter(s) may be used
> 
> 'hist:key=latency.log2:val=hitcount:sort=latency'
> 'hist:key=ltype,latency:val=hitcount:sort=latency if cpu==1'
> 'hist:key=ltype:val=latency:sort=ltype if ltype==0 && cpu==2'
> 
> Where ltype is
> 0: IRQSOFF latency
> 1: PREEMPTOFF Latency
> 2: Critical Timings
> 
> This captures only the latencies introduced by disabled irqs and
> preemption. Additional per process data has to be captured to calculate
> the effective latencies introduced for individual processes.
> 
> Initial work - latency.patch
> 
> [1] https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit/?h=v3.14-rt-rebase&id=56d50cc34943bbba12b8c5942ee1ae3b29f73acb
> 
> Signed-off-by: Binoy Jayan <binoy.jayan@linaro.org>
> ---
>  include/trace/events/latency.h | 35 +++++++++++++++++++++++++++++++++++
>  kernel/trace/trace_irqsoff.c   | 42 ++++++++++++++++++++++++++++++++++++++++++
>  2 files changed, 77 insertions(+)
>  create mode 100644 include/trace/events/latency.h
> 
> diff --git a/include/trace/events/latency.h b/include/trace/events/latency.h
> new file mode 100644
> index 0000000..e89be12
> --- /dev/null
> +++ b/include/trace/events/latency.h
> @@ -0,0 +1,35 @@
> +#undef TRACE_SYSTEM
> +#define TRACE_SYSTEM latency
> +
> +#if !defined(_TRACE_HIST_H) || defined(TRACE_HEADER_MULTI_READ)
> +#define _TRACE_HIST_H
> +
> +#include <linux/tracepoint.h>
> +
> +DECLARE_EVENT_CLASS(latency_template,
> +	TP_PROTO(int ltype, cycles_t latency),
> +
> +	TP_ARGS(ltype, latency),
> +
> +	TP_STRUCT__entry(
> +		__field(int,		ltype)
> +		__field(cycles_t,	latency)
> +	),
> +
> +	TP_fast_assign(
> +		__entry->ltype		= ltype;
> +		__entry->latency	= latency;
> +	),
> +
> +	TP_printk("ltype=%d, latency=%lu",
> +		__entry->ltype, (unsigned long) __entry->latency)

The print of ltype should be text and not a number. Well, you could
have both text and a number, but a number is useless for those looking
at traces.

There's infrastructure to do this, see __print_symbolic() and
TRACE_DEFINE_ENUM().

-- Steve

> +);
> +
> +DEFINE_EVENT(latency_template, latency_preempt,
> +	    TP_PROTO(int ltype, cycles_t latency),
> +	    TP_ARGS(ltype, latency));
> +
> +#endif /* _TRACE_HIST_H */
> +

  parent reply	other threads:[~2016-08-30 14:08 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-30 10:28 [PATCH v4 0/3] *** Latency histograms - IRQSOFF,PREEMPTOFF *** Binoy Jayan
2016-08-30 10:28 ` [PATCH v4 1/3] tracing: Deference pointers without RCU checks Binoy Jayan
2016-08-30 10:28 ` [PATCH v4 2/3] tracing: Add trace_irqsoff tracepoints Binoy Jayan
2016-08-30 11:30   ` Daniel Wagner
2016-08-30 11:49     ` Binoy Jayan
2016-08-30 14:08   ` Steven Rostedt [this message]
2016-08-31 11:39     ` Binoy Jayan
2016-08-30 10:28 ` [PATCH v4 3/3] tracing: Histogram for missed timer offsets Binoy Jayan
2016-08-30 10:50   ` Masami Hiramatsu
2016-09-02 12:41     ` Binoy Jayan
2016-09-02 15:54       ` Masami Hiramatsu
2016-08-30 14:15   ` Steven Rostedt
2016-08-31 11:34     ` Binoy Jayan
2016-08-31 12:42       ` Steven Rostedt
2016-08-30 11:39 ` [PATCH v4 0/3] *** Latency histograms - IRQSOFF,PREEMPTOFF *** Daniel Wagner
2016-08-30 12:02   ` Masami Hiramatsu

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=20160830100838.05d4b87e@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=arnd@arndb.de \
    --cc=binoy.jayan@linaro.org \
    --cc=daniel.wagner@bmw-carit.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masami.hiramatsu@linaro.org \
    --cc=mingo@redhat.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;
as well as URLs for NNTP newsgroup(s).