Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 175408
b: refs/heads/master
c: 180570f
h: refs/heads/master
v: v3
  • Loading branch information
Ulrich Drepper authored and Ingo Molnar committed Dec 7, 2009
1 parent 42de319 commit d4c806c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 67a6259ec97b8408f86f2fe8459d2233f0b0987d
refs/heads/master: 180570fdb7a3c404b599f0a318c2ccf86e4827ed
15 changes: 3 additions & 12 deletions trunk/tools/perf/util/parse-events.c
Original file line number Diff line number Diff line change
Expand Up @@ -467,28 +467,19 @@ parse_subsystem_tracepoint_event(char *sys_name, char *flags)
while ((evt_ent = readdir(evt_dir))) {
char event_opt[MAX_EVOPT_LEN + 1];
int len;
unsigned int rem = MAX_EVOPT_LEN;

if (!strcmp(evt_ent->d_name, ".")
|| !strcmp(evt_ent->d_name, "..")
|| !strcmp(evt_ent->d_name, "enable")
|| !strcmp(evt_ent->d_name, "filter"))
continue;

len = snprintf(event_opt, MAX_EVOPT_LEN, "%s:%s", sys_name,
evt_ent->d_name);
len = snprintf(event_opt, MAX_EVOPT_LEN, "%s:%s%s%s", sys_name,
evt_ent->d_name, flags ? ":" : "",
flags ?: "");
if (len < 0)
return EVT_FAILED;

rem -= len;
if (flags) {
if (rem < strlen(flags) + 1)
return EVT_FAILED;

strcat(event_opt, ":");
strcat(event_opt, flags);
}

if (parse_events(NULL, event_opt, 0))
return EVT_FAILED;
}
Expand Down

0 comments on commit d4c806c

Please sign in to comment.