diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-08-22 14:26:56 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-08-22 14:26:56 -0400 |
| commit | 8f6544edb2c7a7464fbbce1d86a4de414dc0cf95 (patch) | |
| tree | 5030e903106465b36e769ea04d4dfe2b91b22949 /tools/perf/util/parse-events.c | |
| parent | 4762e252f4afc6909edb0babe9c25f126afedcaa (diff) | |
| parent | fe4c51b22080691792d3e28d86acb4d4ccb7e8e8 (diff) | |
Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
perf tools: Add group event scheduling option to perf record/stat
MAINTAINERS: Fix list of perf events source files
perf tools: Fix build against newer glibc
perf tools: Fix error handling of unknown events
perf evlist: Fix missing event name init for default event
perf list: Fix exit value
Diffstat (limited to 'tools/perf/util/parse-events.c')
| -rw-r--r-- | tools/perf/util/parse-events.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c index 4ea7e19f5251..928918b796b2 100644 --- a/tools/perf/util/parse-events.c +++ b/tools/perf/util/parse-events.c | |||
| @@ -697,7 +697,11 @@ parse_raw_event(const char **strp, struct perf_event_attr *attr) | |||
| 697 | return EVT_FAILED; | 697 | return EVT_FAILED; |
| 698 | n = hex2u64(str + 1, &config); | 698 | n = hex2u64(str + 1, &config); |
| 699 | if (n > 0) { | 699 | if (n > 0) { |
| 700 | *strp = str + n + 1; | 700 | const char *end = str + n + 1; |
| 701 | if (*end != '\0' && *end != ',' && *end != ':') | ||
| 702 | return EVT_FAILED; | ||
| 703 | |||
| 704 | *strp = end; | ||
| 701 | attr->type = PERF_TYPE_RAW; | 705 | attr->type = PERF_TYPE_RAW; |
| 702 | attr->config = config; | 706 | attr->config = config; |
| 703 | return EVT_HANDLED; | 707 | return EVT_HANDLED; |
| @@ -1097,6 +1101,4 @@ void print_events(const char *event_glob) | |||
| 1097 | printf("\n"); | 1101 | printf("\n"); |
| 1098 | 1102 | ||
| 1099 | print_tracepoint_events(NULL, NULL); | 1103 | print_tracepoint_events(NULL, NULL); |
| 1100 | |||
| 1101 | exit(129); | ||
| 1102 | } | 1104 | } |
