summaryrefslogtreecommitdiffstats
path: root/tools/perf/util/trace-event-parse.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/util/trace-event-parse.c')
-rw-r--r--tools/perf/util/trace-event-parse.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/tools/perf/util/trace-event-parse.c b/tools/perf/util/trace-event-parse.c
index 55b41b9..be8412d 100644
--- a/tools/perf/util/trace-event-parse.c
+++ b/tools/perf/util/trace-event-parse.c
@@ -897,6 +897,21 @@ static int event_read_fields(struct event *event, struct format_field **fields)
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;
+
if (read_expect_type(EVENT_NEWLINE, &token) < 0)
goto fail;
free_token(token);
@@ -2845,6 +2860,15 @@ static void parse_header_field(char *type,
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)
return;
free_token(token);
OpenPOWER on IntegriCloud