The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Tom Zanussi <tom.zanussi@linux.intel.com>
To: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Cc: rostedt@goodmis.org, daniel.wagner@bmw-carit.de,
	namhyung@kernel.org, josh@joshtriplett.org, andi@firstfloor.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v7 07/10] tracing: Add 'hist' event trigger command
Date: Wed, 10 Jun 2015 11:32:19 -0500	[thread overview]
Message-ID: <1433953939.25953.12.camel@picadillo> (raw)
In-Reply-To: <55784650.6050907@hitachi.com>

On Wed, 2015-06-10 at 23:14 +0900, Masami Hiramatsu wrote:
> On 2015/06/09 6:32, Tom Zanussi wrote:
> > 'hist' triggers allow users to continually aggregate trace events,
> > which can then be viewed afterwards by simply reading a 'hist' file
> > containing the aggregation in a human-readable format.
> > 
> > The basic idea is very simple and boils down to a mechanism whereby
> > trace events, rather than being exhaustively dumped in raw form and
> > viewed directly, are automatically 'compressed' into meaningful tables
> > completely defined by the user.
> > 
> > This is done strictly via single-line command-line commands and
> > without the aid of any kind of programming language or interpreter.
> > 
> > A surprising number of typical use cases can be accomplished by users
> > via this simple mechanism.  In fact, a large number of the tasks that
> > users typically do using the more complicated script-based tracing
> > tools, at least during the initial stages of an investigation, can be
> > accomplished by simply specifying a set of keys and values to be used
> > in the creation of a hash table.
> > 
> > The Linux kernel trace event subsystem happens to provide an extensive
> > list of keys and values ready-made for such a purpose in the form of
> > the event format files associated with each trace event.  By simply
> > consulting the format file for field names of interest and by plugging
> > them into the hist trigger command, users can create an endless number
> > of useful aggregations to help with investigating various properties
> > of the system.  See Documentation/trace/events.txt for examples.
> > 
> > hist triggers are implemented on top of the existing event trigger
> > infrastructure, and as such are consistent with the existing triggers
> > from a user's perspective as well.
> > 
> > The basic syntax follows the existing trigger syntax.  Users start an
> > aggregation by writing a 'hist' trigger to the event of interest's
> > trigger file:
> > 
> >   # echo hist:keys=xxx:values=yyy [ if filter] > event/trigger
> > 
> > Once a hist trigger has been set up, by default it continually
> > aggregates every matching event into a hash table using the event key
> > and value fields specified.
> > 
> > To view the aggregation at any point in time, simply read the 'hist'
> > file in the same directory as the 'trigger' file:
> > 
> >   # cat event/hist
> > 
> > The detailed syntax provides additional options for user control, and
> > is described exhaustively in Documentation/trace/events.txt and in the
> > virtual tracing/README file in the tracing subsystem.
> > 
> > Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
> > 
> > fixes sort key parsing
> > 
> > Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
> > 
> > Add sym-offset
> > 
> > And change sym, add more space for both.  And make modifiers stricter.
> > 
> > Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
> 
> 
> Why does this have same singned-off-bys? :)
> 

Hmm, yeah, forgot to squash the comments when I squashed the commits,
thanks for noticing.

> BTW, this looks a bit big to review and including many different features.
> It seems to be broken into several incremental patches, like
> 
> - Add a basic hist trigger (key, val, size and simple hitcount sorting)
> - Add multiple keys and values support
> - Add "sort" attribute
> - Add "continue" and "pause" attribute
> - Add "clear" attribute
> - Support ".hex" option for keys and vals
> - Support ".sym" and ".sym-offset" options for keys and vals
> - Support ".execname" option for keys
> - Support ".syscall" option for keys
> - Support ".stacktrace" option for keys
> 

Yeah, it just kept growing and growing with each revision...

Now that it's pretty much feature-complete, I'll break the features out
again in a new revision, for easier review.

Thanks,

Tom


> 
> Thank you,
> 
> 
> 



  reply	other threads:[~2015-06-10 16:39 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-08 21:31 [PATCH v7 00/10] tracing: 'hist' triggers Tom Zanussi
2015-06-08 21:32 ` [PATCH v3 01/10] tracing: Update cond flag when enabling or disabling a trigger Tom Zanussi
2015-06-12 18:01   ` Steven Rostedt
2015-06-13  8:45     ` Daniel Wagner
2015-06-15  7:02       ` Daniel Wagner
2015-06-29 20:25     ` Tom Zanussi
2015-06-08 21:32 ` [PATCH v7 02/10] tracing: Make ftrace_event_field checking functions available Tom Zanussi
2015-06-08 21:32 ` [PATCH v7 03/10] tracing: Add event record param to trigger_ops.func() Tom Zanussi
2015-06-08 21:32 ` [PATCH v7 04/10] tracing: Add get_syscall_name() Tom Zanussi
2015-06-08 21:32 ` [PATCH v7 05/10] tracing: Add a per-event-trigger 'paused' field Tom Zanussi
2015-06-08 21:32 ` [PATCH v7 06/10] trace: Add lock-free tracing_map Tom Zanussi
2015-06-12 18:17   ` Steven Rostedt
2015-06-29 20:19     ` Tom Zanussi
2015-06-12 20:47   ` Steven Rostedt
2015-06-12 20:52   ` Steven Rostedt
2015-06-29 20:33     ` Tom Zanussi
2015-06-08 21:32 ` [PATCH v7 07/10] tracing: Add 'hist' event trigger command Tom Zanussi
2015-06-10 14:14   ` Masami Hiramatsu
2015-06-10 16:32     ` Tom Zanussi [this message]
2015-06-08 21:32 ` [PATCH v7 08/10] tracing: Add enable_hist/disable_hist triggers Tom Zanussi
2015-06-08 21:32 ` [PATCH v7 09/10] tracing: Add 'hist' trigger Documentation Tom Zanussi
2015-06-08 21:32 ` [PATCH v3 10/10] ftrace: Add function_hist tracer Tom Zanussi
2015-06-10  2:57 ` [PATCH v7 00/10] tracing: 'hist' triggers Masami Hiramatsu
2015-06-11  3:05 ` Namhyung Kim
2015-06-11 20:42   ` Tom Zanussi

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=1433953939.25953.12.camel@picadillo \
    --to=tom.zanussi@linux.intel.com \
    --cc=andi@firstfloor.org \
    --cc=daniel.wagner@bmw-carit.de \
    --cc=josh@joshtriplett.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masami.hiramatsu.pt@hitachi.com \
    --cc=namhyung@kernel.org \
    --cc=rostedt@goodmis.org \
    /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