tracing/filters: Add filter_type to struct ftrace_event_field

The type of a field is stored as a string in @type, and here
we add @filter_type which is an enum value.

This prepares for later patches, so we can specifically assign
different @filter_type for the same @type.

For example normally a "char *" field is treated as a ptr,
but we may want it to be treated as a string when doing filting.

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
LKML-Reference: <4A7B925E.9030605@cn.fujitsu.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
This commit is contained in:
Li Zefan
2009-08-07 10:33:02 +08:00
committed by Steven Rostedt
parent 6591b49387
commit aa38e9fc3e
3 changed files with 18 additions and 9 deletions

View File

@ -44,9 +44,11 @@ int trace_define_field(struct ftrace_event_call *call, const char *type,
if (!field->type)
goto err;
field->filter_type = filter_assign_type(type);
field->offset = offset;
field->size = size;
field->is_signed = is_signed;
list_add(&field->link, &call->fields);
return 0;