public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] tracing/filters: Support specifying filter hook to a TRACE_EVENT field
@ 2009-08-06  6:05 Li Zefan
  2009-08-06  6:06 ` [PATCH 1/3] tracing/filters: Add filter_type to struct ftrace_event_field Li Zefan
                   ` (3 more replies)
  0 siblings, 4 replies; 14+ messages in thread
From: Li Zefan @ 2009-08-06  6:05 UTC (permalink / raw)
  To: Frédéric Weisbecker; +Cc: Steven Rostedt, Ingo Molnar, LKML

Currently only static strings and dynamic strings have their
own filter functions, other types of field are treated as
integers.

This patchset allows assigning a specific filter type to a
field, so a field which is defined as:

	__field_ext(const char *, str, FILTER_PTR_STR)

will be treated as a string but not a plain pointer, and then
we can set the filter like this:

	# echo 'str == foo' > filter

And it's easy to add more filter functions for different types
to turn these into valid operations:

	(dev is of type dev_t)
	# echo 'dev == 8:0' > filter

	(callsite is of type void * or unsigned long)
	# echo 'callsite == skb_free' > filter

[PATCH 1/3] tracing/filters: Add filter_type to struct ftrace_event_field
[PATCH 2/3] tracing/filters: Add __field_ext() to TRACE_EVENT
[PATCH 3/3] tracing/filters: Support filtering for char * strings
---
 include/linux/ftrace_event.h       |   12 +++++++-
 include/trace/ftrace.h             |   28 ++++++++++++++++----
 kernel/trace/trace.h               |    2 +
 kernel/trace/trace_events.c        |    9 ++++++-
 kernel/trace/trace_events_filter.c |   47 +++++++++++++++++++++++++----------
 kernel/trace/trace_export.c        |    7 +++--
 6 files changed, 79 insertions(+), 26 deletions(-)


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2009-08-07  3:31 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-06  6:05 [PATCH 0/3] tracing/filters: Support specifying filter hook to a TRACE_EVENT field Li Zefan
2009-08-06  6:06 ` [PATCH 1/3] tracing/filters: Add filter_type to struct ftrace_event_field Li Zefan
2009-08-06  6:06 ` [PATCH 2/3] tracing/filters: Add __field_ext() to TRACE_EVENT Li Zefan
2009-08-06 14:17   ` Steven Rostedt
2009-08-06  6:06 ` [PATCH 3/3] tracing/filters: Support filtering for char * strings Li Zefan
2009-08-06 14:21   ` Steven Rostedt
2009-08-07  1:20     ` Li Zefan
2009-08-07  2:54       ` Steven Rostedt
2009-08-07  3:12         ` Li Zefan
2009-08-07  3:22           ` Steven Rostedt
2009-08-07  3:24             ` Li Zefan
2009-08-07  3:31               ` Steven Rostedt
2009-08-06 14:23 ` [PATCH 0/3] tracing/filters: Support specifying filter hook to a TRACE_EVENT field Steven Rostedt
2009-08-07  1:08   ` Li Zefan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox