diff options
-rw-r--r-- | tools/perf/util/parse-events.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c index 609d5a9470c5..05d0c5c2030c 100644 --- a/tools/perf/util/parse-events.c +++ b/tools/perf/util/parse-events.c | |||
@@ -450,7 +450,8 @@ parse_single_tracepoint_event(char *sys_name, | |||
450 | /* sys + ':' + event + ':' + flags*/ | 450 | /* sys + ':' + event + ':' + flags*/ |
451 | #define MAX_EVOPT_LEN (MAX_EVENT_LENGTH * 2 + 2 + 128) | 451 | #define MAX_EVOPT_LEN (MAX_EVENT_LENGTH * 2 + 2 + 128) |
452 | static enum event_result | 452 | static enum event_result |
453 | parse_subsystem_tracepoint_event(char *sys_name, char *flags) | 453 | parse_multiple_tracepoint_event(char *sys_name, const char *evt_exp, |
454 | char *flags) | ||
454 | { | 455 | { |
455 | char evt_path[MAXPATHLEN]; | 456 | char evt_path[MAXPATHLEN]; |
456 | struct dirent *evt_ent; | 457 | struct dirent *evt_ent; |
@@ -474,6 +475,9 @@ parse_subsystem_tracepoint_event(char *sys_name, char *flags) | |||
474 | || !strcmp(evt_ent->d_name, "filter")) | 475 | || !strcmp(evt_ent->d_name, "filter")) |
475 | continue; | 476 | continue; |
476 | 477 | ||
478 | if (!strglobmatch(evt_ent->d_name, evt_exp)) | ||
479 | continue; | ||
480 | |||
477 | len = snprintf(event_opt, MAX_EVOPT_LEN, "%s:%s%s%s", sys_name, | 481 | len = snprintf(event_opt, MAX_EVOPT_LEN, "%s:%s%s%s", sys_name, |
478 | evt_ent->d_name, flags ? ":" : "", | 482 | evt_ent->d_name, flags ? ":" : "", |
479 | flags ?: ""); | 483 | flags ?: ""); |
@@ -522,9 +526,10 @@ static enum event_result parse_tracepoint_event(const char **strp, | |||
522 | if (evt_length >= MAX_EVENT_LENGTH) | 526 | if (evt_length >= MAX_EVENT_LENGTH) |
523 | return EVT_FAILED; | 527 | return EVT_FAILED; |
524 | 528 | ||
525 | if (!strcmp(evt_name, "*")) { | 529 | if (strpbrk(evt_name, "*?")) { |
526 | *strp = evt_name + evt_length; | 530 | *strp = evt_name + evt_length; |
527 | return parse_subsystem_tracepoint_event(sys_name, flags); | 531 | return parse_multiple_tracepoint_event(sys_name, evt_name, |
532 | flags); | ||
528 | } else | 533 | } else |
529 | return parse_single_tracepoint_event(sys_name, evt_name, | 534 | return parse_single_tracepoint_event(sys_name, evt_name, |
530 | evt_length, flags, | 535 | evt_length, flags, |