summaryrefslogtreecommitdiff
path: root/tools/perf/util
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/util')
-rw-r--r--tools/perf/util/trace-event-parse.c24
-rw-r--r--tools/perf/util/trace-event.h1
2 files changed, 25 insertions, 0 deletions
diff --git a/tools/perf/util/trace-event-parse.c b/tools/perf/util/trace-event-parse.c
index 55b41b9e3834..be8412d699a1 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);
diff --git a/tools/perf/util/trace-event.h b/tools/perf/util/trace-event.h
index 162c3e6deb93..00b440df66d8 100644
--- a/tools/perf/util/trace-event.h
+++ b/tools/perf/util/trace-event.h
@@ -26,6 +26,7 @@ enum {
enum format_flags {
FIELD_IS_ARRAY = 1,
FIELD_IS_POINTER = 2,
+ FIELD_IS_SIGNED = 4,
};
struct format_field {