tracing/events: Add 'signed' field to format files
The sign info used for filters in the kernel is also useful to applications that process the trace stream. Add it to the format files and make it available to userspace. Signed-off-by: Tom Zanussi <tzanussi@gmail.com> Acked-by: Frederic Weisbecker <fweisbec@gmail.com> Cc: rostedt@goodmis.org Cc: lizf@cn.fujitsu.com Cc: hch@infradead.org Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Mike Galbraith <efault@gmx.de> Cc: Paul Mackerras <paulus@samba.org> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> LKML-Reference: <1254809398-8078-2-git-send-email-tzanussi@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
@ -894,6 +894,21 @@ static int event_read_fields(struct event *event, struct format_field **fields)
|
||||
field->size = strtoul(token, NULL, 0);
|
||||
free_token(token);
|
||||
|
||||
if (read_expected(EVENT_OP, (char *)";") < 0)
|
||||
goto fail_expect;
|
||||
|
||||
if (read_expected(EVENT_ITEM, (char *)"signed") < 0)
|
||||
goto fail_expect;
|
||||
|
||||
if (read_expected(EVENT_OP, (char *)":") < 0)
|
||||
goto fail_expect;
|
||||
|
||||
if (read_expect_type(EVENT_ITEM, &token))
|
||||
goto fail;
|
||||
if (strtoul(token, NULL, 0))
|
||||
field->flags |= FIELD_IS_SIGNED;
|
||||
free_token(token);
|
||||
|
||||
if (read_expected(EVENT_OP, (char *)";") < 0)
|
||||
goto fail_expect;
|
||||
|
||||
@ -2843,6 +2858,15 @@ static void parse_header_field(char *type,
|
||||
return;
|
||||
*size = atoi(token);
|
||||
free_token(token);
|
||||
if (read_expected(EVENT_OP, (char *)";") < 0)
|
||||
return;
|
||||
if (read_expected(EVENT_ITEM, (char *)"signed") < 0)
|
||||
return;
|
||||
if (read_expected(EVENT_OP, (char *)":") < 0)
|
||||
return;
|
||||
if (read_expect_type(EVENT_ITEM, &token) < 0)
|
||||
return;
|
||||
free_token(token);
|
||||
if (read_expected(EVENT_OP, (char *)";") < 0)
|
||||
return;
|
||||
if (read_expect_type(EVENT_NEWLINE, &token) < 0)
|
||||
|
Reference in New Issue
Block a user