lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160830100838.05d4b87e@gandalf.local.home>
Date:   Tue, 30 Aug 2016 10:08:38 -0400
From:   Steven Rostedt <rostedt@...dmis.org>
To:     Binoy Jayan <binoy.jayan@...aro.org>
Cc:     Ingo Molnar <mingo@...hat.com>,
        Daniel Wagner <daniel.wagner@...-carit.de>,
        Arnd Bergmann <arnd@...db.de>, linux-kernel@...r.kernel.org,
        Masami <masami.hiramatsu@...aro.org>
Subject: Re: [PATCH v4 2/3] tracing: Add trace_irqsoff tracepoints

On Tue, 30 Aug 2016 15:58:43 +0530
Binoy Jayan <binoy.jayan@...aro.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@...aro.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 */
> +

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ