mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Eduard - Gabriel Munteanu <eduard.munteanu@linux360.ro>
Cc: rostedt@goodmis.org, compudj@krystal.dyndns.org,
	fweisbec@gmail.com, penberg@cs.helsinki.fi,
	paulmck@linux.vnet.ibm.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 6/7] kmemtrace: restore original tracing data binary format, improve ABI
Date: Mon, 23 Mar 2009 16:06:13 +0100	[thread overview]
Message-ID: <20090323150613.GB21267@elte.hu> (raw)
In-Reply-To: <161be9ca8a27b432c4a6ab79f47788c4521652ae.1237813499.git.eduard.munteanu@linux360.ro>


* Eduard - Gabriel Munteanu <eduard.munteanu@linux360.ro> wrote:

> When kmemtrace was ported to ftrace, the marker strings were taken 
> as an indication of how the traced data was being exposed to the 
> userspace. However, the actual format had been binary, not text.
> 
> This restores the original binary format, while also adding an 
> origin CPU field (since ftrace doesn't expose the data per-CPU to 
> userspace), and re-adding the timestamp field. It also drops 
> arch-independent field sizing where it didn't make sense, so 
> pointers won't always be 64 bits wide like they used to.

Thanks Eduard, nice stuff! I'll pick up your patches as they are 
nice fixes and cleanups but you might want to take a look at a few 
things that happened in tracing land in the past few weeks:

firstly, you can now fetch data in a per CPU way:

[root@aldebaran tracing]# pwd
/debug/tracing
[root@aldebaran tracing]# ll per_cpu/
total 0
drwxr-xr-x 2 root root 0 2009-03-23 10:44 cpu0
drwxr-xr-x 2 root root 0 2009-03-23 10:44 cpu1
drwxr-xr-x 2 root root 0 2009-03-23 10:44 cpu10
drwxr-xr-x 2 root root 0 2009-03-23 10:44 cpu11
drwxr-xr-x 2 root root 0 2009-03-23 10:44 cpu12
drwxr-xr-x 2 root root 0 2009-03-23 10:44 cpu13
drwxr-xr-x 2 root root 0 2009-03-23 10:44 cpu14
drwxr-xr-x 2 root root 0 2009-03-23 10:44 cpu15
drwxr-xr-x 2 root root 0 2009-03-23 10:44 cpu2
drwxr-xr-x 2 root root 0 2009-03-23 10:44 cpu3
drwxr-xr-x 2 root root 0 2009-03-23 10:44 cpu4
drwxr-xr-x 2 root root 0 2009-03-23 10:44 cpu5
drwxr-xr-x 2 root root 0 2009-03-23 10:44 cpu6
drwxr-xr-x 2 root root 0 2009-03-23 10:44 cpu7
drwxr-xr-x 2 root root 0 2009-03-23 10:44 cpu8
drwxr-xr-x 2 root root 0 2009-03-23 10:44 cpu9
[root@aldebaran tracing]# ll per_cpu/cpu0/
total 0
-rw-r--r-- 1 root root 0 2009-03-23 10:44 trace
-r--r--r-- 1 root root 0 2009-03-23 10:44 trace_pipe
-r--r--r-- 1 root root 0 2009-03-23 10:44 trace_pipe_raw

This is a relatively new addition. The trace_pipe_raw file can be 
used to fetch binary data, and it has working splice() support as 
well, for zero-copy data streaming.

To get those binary records the tracepoint has to be expressed not 
in terms of DEFINE_TRACE(), but in terms of DEFINE_EVENT(). See a 
few examples in:

  include/trace/irq_event_types.h
  include/trace/sched_event_types.h

With latest -tip you can also define simple in-situ filters on each 
tracepoint, via the 'filter' file. I think this capability would be 
particularly interesting for kmemtrace, to restrict tracing to a 
given cache only, to particular sizes, etc.

This too needs DEFINE_EVENT() definition. It's more elaborate to 
express tracepoints via DEFINE_EVENT() than via 
DECLARE/DEFINE_TRACE(), but it results in faster tracing and enables 
more built-in features.

See this commit in -tip:

 | commit 7ce7e4249921d5073e764f7ff7ad83cfa9894bd7
 | Author: Tom Zanussi <tzanussi@gmail.com>
 | Date:   Sun Mar 22 03:31:04 2009 -0500
 |
 |     tracing: add per-event filtering

for a short description about how these filters work.

Thanks,

	Ingo

  parent reply	other threads:[~2009-03-23 15:06 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-23 13:12 [PATCH 0/7] kmemtrace & tracing updates Eduard - Gabriel Munteanu
2009-03-23 13:12 ` [PATCH 1/7] RCU: don't include unnecessary headers, allow kmemtrace w/ tracepoints Eduard - Gabriel Munteanu
2009-03-23 13:12   ` [PATCH 2/7] tracing: provide trace_seq_reserve() Eduard - Gabriel Munteanu
2009-03-23 13:12     ` [PATCH 3/7] tracing: add missing 'extern' keywords to trace_output.h Eduard - Gabriel Munteanu
2009-03-23 13:12       ` [PATCH 4/7] kmemtrace: use tracepoints Eduard - Gabriel Munteanu
2009-03-23 13:12         ` [PATCH 5/7] kmemtrace: kmemtrace_alloc() must fill type_id Eduard - Gabriel Munteanu
2009-03-23 13:12           ` [PATCH 6/7] kmemtrace: restore original tracing data binary format, improve ABI Eduard - Gabriel Munteanu
2009-03-23 13:12             ` [PATCH 7/7] kmemtrace: update usage of ring_buffer_lock_reserve() Eduard - Gabriel Munteanu
2009-03-23 14:55               ` Ingo Molnar
2009-03-24  8:31                 ` Eduard - Gabriel Munteanu
2009-03-23 15:06             ` Ingo Molnar [this message]
2009-03-23 15:19             ` [tip:tracing/kmemtrace] kmemtrace: restore original tracing data binary format, improve ABI Eduard - Gabriel Munteanu
2009-03-23 15:19             ` [tip:tracing/kmemtrace] kmemtrace: small cleanups Ingo Molnar
2009-04-03 10:37             ` [tip:tracing/kmemtrace-v2] kmemtrace: restore original tracing data binary format, improve ABI Eduard - Gabriel Munteanu
2009-04-03 10:37             ` [tip:tracing/kmemtrace-v2] kmemtrace: small cleanups Ingo Molnar
2009-03-23 15:19           ` [tip:tracing/kmemtrace] kmemtrace: kmemtrace_alloc() must fill type_id Eduard - Gabriel Munteanu
2009-04-03 10:36           ` [tip:tracing/kmemtrace-v2] " Eduard - Gabriel Munteanu
2009-03-23 15:18         ` [tip:tracing/kmemtrace] kmemtrace: use tracepoints Eduard - Gabriel Munteanu
2009-04-03 10:36         ` [tip:tracing/kmemtrace-v2] " Eduard - Gabriel Munteanu
2009-03-23 15:18       ` [tip:tracing/kmemtrace] tracing: add missing 'extern' keywords to trace_output.h Eduard - Gabriel Munteanu
2009-03-23 15:18     ` [tip:tracing/kmemtrace] tracing: provide trace_seq_reserve() Eduard - Gabriel Munteanu
2009-03-23 15:18   ` [tip:tracing/kmemtrace] rcu: don't include unnecessary headers, allow kmemtrace w/ tracepoints Eduard - Gabriel Munteanu
2009-03-23 15:29 ` [PATCH 0/7] kmemtrace & tracing updates Ingo Molnar

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=20090323150613.GB21267@elte.hu \
    --to=mingo@elte.hu \
    --cc=compudj@krystal.dyndns.org \
    --cc=eduard.munteanu@linux360.ro \
    --cc=fweisbec@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=penberg@cs.helsinki.fi \
    --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

all inboxes | Powered by JetHome®