|
@@ -387,7 +387,8 @@ int parse_events_add_cache(struct list_head *list, int *idx,
|
|
}
|
|
}
|
|
|
|
|
|
static int add_tracepoint(struct list_head *list, int *idx,
|
|
static int add_tracepoint(struct list_head *list, int *idx,
|
|
- char *sys_name, char *evt_name)
|
|
|
|
|
|
+ char *sys_name, char *evt_name,
|
|
|
|
+ struct parse_events_error *error __maybe_unused)
|
|
{
|
|
{
|
|
struct perf_evsel *evsel;
|
|
struct perf_evsel *evsel;
|
|
|
|
|
|
@@ -401,7 +402,8 @@ static int add_tracepoint(struct list_head *list, int *idx,
|
|
}
|
|
}
|
|
|
|
|
|
static int add_tracepoint_multi_event(struct list_head *list, int *idx,
|
|
static int add_tracepoint_multi_event(struct list_head *list, int *idx,
|
|
- char *sys_name, char *evt_name)
|
|
|
|
|
|
+ char *sys_name, char *evt_name,
|
|
|
|
+ struct parse_events_error *error)
|
|
{
|
|
{
|
|
char evt_path[MAXPATHLEN];
|
|
char evt_path[MAXPATHLEN];
|
|
struct dirent *evt_ent;
|
|
struct dirent *evt_ent;
|
|
@@ -425,7 +427,7 @@ static int add_tracepoint_multi_event(struct list_head *list, int *idx,
|
|
if (!strglobmatch(evt_ent->d_name, evt_name))
|
|
if (!strglobmatch(evt_ent->d_name, evt_name))
|
|
continue;
|
|
continue;
|
|
|
|
|
|
- ret = add_tracepoint(list, idx, sys_name, evt_ent->d_name);
|
|
|
|
|
|
+ ret = add_tracepoint(list, idx, sys_name, evt_ent->d_name, error);
|
|
}
|
|
}
|
|
|
|
|
|
closedir(evt_dir);
|
|
closedir(evt_dir);
|
|
@@ -433,15 +435,17 @@ static int add_tracepoint_multi_event(struct list_head *list, int *idx,
|
|
}
|
|
}
|
|
|
|
|
|
static int add_tracepoint_event(struct list_head *list, int *idx,
|
|
static int add_tracepoint_event(struct list_head *list, int *idx,
|
|
- char *sys_name, char *evt_name)
|
|
|
|
|
|
+ char *sys_name, char *evt_name,
|
|
|
|
+ struct parse_events_error *error)
|
|
{
|
|
{
|
|
return strpbrk(evt_name, "*?") ?
|
|
return strpbrk(evt_name, "*?") ?
|
|
- add_tracepoint_multi_event(list, idx, sys_name, evt_name) :
|
|
|
|
- add_tracepoint(list, idx, sys_name, evt_name);
|
|
|
|
|
|
+ add_tracepoint_multi_event(list, idx, sys_name, evt_name, error) :
|
|
|
|
+ add_tracepoint(list, idx, sys_name, evt_name, error);
|
|
}
|
|
}
|
|
|
|
|
|
static int add_tracepoint_multi_sys(struct list_head *list, int *idx,
|
|
static int add_tracepoint_multi_sys(struct list_head *list, int *idx,
|
|
- char *sys_name, char *evt_name)
|
|
|
|
|
|
+ char *sys_name, char *evt_name,
|
|
|
|
+ struct parse_events_error *error)
|
|
{
|
|
{
|
|
struct dirent *events_ent;
|
|
struct dirent *events_ent;
|
|
DIR *events_dir;
|
|
DIR *events_dir;
|
|
@@ -465,7 +469,7 @@ static int add_tracepoint_multi_sys(struct list_head *list, int *idx,
|
|
continue;
|
|
continue;
|
|
|
|
|
|
ret = add_tracepoint_event(list, idx, events_ent->d_name,
|
|
ret = add_tracepoint_event(list, idx, events_ent->d_name,
|
|
- evt_name);
|
|
|
|
|
|
+ evt_name, error);
|
|
}
|
|
}
|
|
|
|
|
|
closedir(events_dir);
|
|
closedir(events_dir);
|
|
@@ -473,12 +477,13 @@ static int add_tracepoint_multi_sys(struct list_head *list, int *idx,
|
|
}
|
|
}
|
|
|
|
|
|
int parse_events_add_tracepoint(struct list_head *list, int *idx,
|
|
int parse_events_add_tracepoint(struct list_head *list, int *idx,
|
|
- char *sys, char *event)
|
|
|
|
|
|
+ char *sys, char *event,
|
|
|
|
+ struct parse_events_error *error)
|
|
{
|
|
{
|
|
if (strpbrk(sys, "*?"))
|
|
if (strpbrk(sys, "*?"))
|
|
- return add_tracepoint_multi_sys(list, idx, sys, event);
|
|
|
|
|
|
+ return add_tracepoint_multi_sys(list, idx, sys, event, error);
|
|
else
|
|
else
|
|
- return add_tracepoint_event(list, idx, sys, event);
|
|
|
|
|
|
+ return add_tracepoint_event(list, idx, sys, event, error);
|
|
}
|
|
}
|
|
|
|
|
|
static int
|
|
static int
|