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]
Date:	Mon, 29 Dec 2008 12:56:45 +0100
From:	Ingo Molnar <mingo@...e.hu>
To:	Frederic Weisbecker <fweisbec@...il.com>
Cc:	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Steven Rostedt <rostedt@...dmis.org>,
	Pekka Enberg <penberg@...helsinki.fi>
Subject: Re: [PATCH 1/2] tracing/ftrace: provide the base infrastructure
	for stat tracing


* Frederic Weisbecker <fweisbec@...il.com> wrote:

> Impact: enhance the tracing API to provide statistical tracing
> 
> The goal of this patch is to normalize and make more easy the 
> implementation of statistical (histogram) tracing.
> 
> It implements a trace_stat file into the /debugfs/tracing directory 
> where one can print a one-shot output of statistics/histogram entries.
> 
> A tracer has to provide two basic iterator callbacks:
> 
> stat_start() => the first entry
> stat_next(prev, idx) => the next one.
> 
> Note that it is adapted for arrays or hash tables or lists.... since
> it provides a pointer to the previous entry and the current index of the
> iterator.
> 
> These two callbacks are called to get a snapshot of the statistics at 
> each opening of the trace_stat file because. The values are so updated 
> between two "cat trace_stat". And the tracer is free to lock its datas 
> during the iteration to keep consistent values.
> 
> Since it is almost always interesting to sort statisticals values to 
> address the problems by priority, this infrastructure provides a 
> "sorting" of the stat entries too if desired. A tracer has just to 
> provide a stat_cmp callback to compare two entries and the stat tracing 
> infrastructure will build a sorted list of the given entries.
> 
> A last callback, called stat_headers, can be implemented by a tracer to 
> output headers on its trace.
> 
> If one of these callbacks is changed on runtime, it just have to signal 
> it to the stat tracing API by calling the init_tracer_stat() helper.
> 
> Signed-off-by: Frederic Weisbecker <fweisbec@...il.com>
> ---
>  kernel/trace/Makefile     |    1 +
>  kernel/trace/trace.c      |    3 +-
>  kernel/trace/trace.h      |   17 +++
>  kernel/trace/trace_stat.c |  250 +++++++++++++++++++++++++++++++++++++++++++++
>  4 files changed, 270 insertions(+), 1 deletions(-)

nice! I've put this into tip/tracing/ftrace (as it depends on Steve's 
event hash rework) - and lets see how this works out with the branch 
tracer in practice.

	Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ