diff options
Diffstat (limited to 'tools/perf/util')
-rw-r--r-- | tools/perf/util/trace-event-parse.c | 24 | ||||
-rw-r--r-- | tools/perf/util/trace-event.h | 1 |
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) | |||
897 | if (read_expected(EVENT_OP, (char *)";") < 0) | 897 | if (read_expected(EVENT_OP, (char *)";") < 0) |
898 | goto fail_expect; | 898 | goto fail_expect; |
899 | 899 | ||
900 | if (read_expected(EVENT_ITEM, (char *)"signed") < 0) | ||
901 | goto fail_expect; | ||
902 | |||
903 | if (read_expected(EVENT_OP, (char *)":") < 0) | ||
904 | goto fail_expect; | ||
905 | |||
906 | if (read_expect_type(EVENT_ITEM, &token)) | ||
907 | goto fail; | ||
908 | if (strtoul(token, NULL, 0)) | ||
909 | field->flags |= FIELD_IS_SIGNED; | ||
910 | free_token(token); | ||
911 | |||
912 | if (read_expected(EVENT_OP, (char *)";") < 0) | ||
913 | goto fail_expect; | ||
914 | |||
900 | if (read_expect_type(EVENT_NEWLINE, &token) < 0) | 915 | if (read_expect_type(EVENT_NEWLINE, &token) < 0) |
901 | goto fail; | 916 | goto fail; |
902 | free_token(token); | 917 | free_token(token); |
@@ -2845,6 +2860,15 @@ static void parse_header_field(char *type, | |||
2845 | free_token(token); | 2860 | free_token(token); |
2846 | if (read_expected(EVENT_OP, (char *)";") < 0) | 2861 | if (read_expected(EVENT_OP, (char *)";") < 0) |
2847 | return; | 2862 | return; |
2863 | if (read_expected(EVENT_ITEM, (char *)"signed") < 0) | ||
2864 | return; | ||
2865 | if (read_expected(EVENT_OP, (char *)":") < 0) | ||
2866 | return; | ||
2867 | if (read_expect_type(EVENT_ITEM, &token) < 0) | ||
2868 | return; | ||
2869 | free_token(token); | ||
2870 | if (read_expected(EVENT_OP, (char *)";") < 0) | ||
2871 | return; | ||
2848 | if (read_expect_type(EVENT_NEWLINE, &token) < 0) | 2872 | if (read_expect_type(EVENT_NEWLINE, &token) < 0) |
2849 | return; | 2873 | return; |
2850 | free_token(token); | 2874 | 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 { | |||
26 | enum format_flags { | 26 | enum format_flags { |
27 | FIELD_IS_ARRAY = 1, | 27 | FIELD_IS_ARRAY = 1, |
28 | FIELD_IS_POINTER = 2, | 28 | FIELD_IS_POINTER = 2, |
29 | FIELD_IS_SIGNED = 4, | ||
29 | }; | 30 | }; |
30 | 31 | ||
31 | struct format_field { | 32 | struct format_field { |