public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Li Zefan <lizf@cn.fujitsu.com>
To: Steven Rostedt <rostedt@goodmis.org>,
	Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>, Jason Baron <jbaron@redhat.com>,
	LKML <linux-kernel@vger.kernel.org>
Subject: [PATCH 0/5] tracing/syscalls: Add filtering support
Date: Wed, 19 Aug 2009 15:51:50 +0800	[thread overview]
Message-ID: <4A8BAF16.8040504@cn.fujitsu.com> (raw)

This patchset adds filtering support for syscall events

For syscall enter events, we can do filtering on syscall
parameters, and for exit events, filter on syscall return
value.

For example, we set 'mode == 0666' (0666 == 0x1b6) to
sys_enter_open, and set 'ret == 0' to sys_exit_open,
and here's the output:

 # echo 'mode == 0666' > events/syscalls/sys_enter_open
 # echo 'ret == 0' > events/syscalls/sys_exit_open
 # echo 1 > events/syscalls/sys_enter_open
 # echo 1 > events/syscalls/sys_exit_open
 # cat trace
 ...
   modprobe-3084 [001] 117.463140: sys_open(filename: 917d3e8, flags: 0, mode: 1b6) 
   modprobe-3084 [001] 117.463176: sys_open -> 0x0
       less-3086 [001] 117.510455: sys_open(filename: 9c6bdb8, flags: 8000, mode: 1b6) 
   sendmail-2574 [001] 122.145840: sys_open(filename: b807a365, flags: 0, mode: 1b6) 
 ...

[PATCH 1/5] tracing/syscalls: Fix fields format for enter events
[PATCH 2/5] tracing/syscalls: Add fields format for exit events
[PATCH 3/5] tracing/events: Add ftrace_event_call param to define_fields()
[PATCH 4/5] tracing/events: Add trace_define_common_fields()
[PATCH 5/5] tracing/syscalls: Add filtering support
---
 include/linux/ftrace_event.h  |   15 ++----
 include/linux/syscalls.h      |   19 +++++--
 include/trace/ftrace.h        |   11 ++---
 include/trace/syscall.h       |   13 ++++-
 kernel/trace/trace_events.c   |   29 +++++++++-
 kernel/trace/trace_export.c   |   13 ++---
 kernel/trace/trace_syscalls.c |  120 +++++++++++++++++++++++++++++++----------
 7 files changed, 156 insertions(+), 64 deletions(-)

             reply	other threads:[~2009-08-19  7:53 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-19  7:51 Li Zefan [this message]
2009-08-19  7:52 ` [PATCH 1/5] tracing/syscalls: Fix fields format for enter events Li Zefan
2009-08-19 13:31   ` [tip:tracing/core] " tip-bot for Li Zefan
2009-08-19  7:53 ` [PATCH 2/5] tracing/syscalls: Add fields format for exit events Li Zefan
2009-08-19 13:31   ` [tip:tracing/core] " tip-bot for Li Zefan
2009-08-19  7:53 ` [PATCH 3/5] tracing/events: Add ftrace_event_call param to define_fields() Li Zefan
2009-08-19 13:31   ` [tip:tracing/core] " tip-bot for Li Zefan
2009-08-19  7:54 ` [PATCH 4/5] tracing/events: Add trace_define_common_fields() Li Zefan
2009-08-19 13:31   ` [tip:tracing/core] " tip-bot for Li Zefan
2009-08-19  7:54 ` [PATCH 5/5] tracing/syscalls: Add filtering support Li Zefan
2009-08-19 13:32   ` [tip:tracing/core] " tip-bot for Li Zefan
2009-08-19 14:55 ` [PATCH 0/5] " Frederic Weisbecker

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=4A8BAF16.8040504@cn.fujitsu.com \
    --to=lizf@cn.fujitsu.com \
    --cc=fweisbec@gmail.com \
    --cc=jbaron@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --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