Skip to content

Commit

Permalink
perf trace-event-info: Rename for_each_event.
Browse files Browse the repository at this point in the history
Avoid a naming conflict with for_each_event with similar code in
parse-events.c, rename to for_each_event_tps.

Signed-off-by: Ian Rogers <irogers@google.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lore.kernel.org/lkml/20210203052659.2975736-1-irogers@google.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
  • Loading branch information
Ian Rogers authored and Arnaldo Carvalho de Melo committed Feb 3, 2021
1 parent 1796829 commit d2e31d7
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tools/perf/util/trace-event-info.c
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ static bool name_in_tp_list(char *sys, struct tracepoint_path *tps)
return false;
}

#define for_each_event(dir, dent, tps) \
#define for_each_event_tps(dir, dent, tps) \
while ((dent = readdir(dir))) \
if (dent->d_type == DT_DIR && \
(strcmp(dent->d_name, ".")) && \
Expand All @@ -174,7 +174,7 @@ static int copy_event_system(const char *sys, struct tracepoint_path *tps)
return -errno;
}

for_each_event(dir, dent, tps) {
for_each_event_tps(dir, dent, tps) {
if (!name_in_tp_list(dent->d_name, tps))
continue;

Expand All @@ -196,7 +196,7 @@ static int copy_event_system(const char *sys, struct tracepoint_path *tps)
}

rewinddir(dir);
for_each_event(dir, dent, tps) {
for_each_event_tps(dir, dent, tps) {
if (!name_in_tp_list(dent->d_name, tps))
continue;

Expand Down Expand Up @@ -274,7 +274,7 @@ static int record_event_files(struct tracepoint_path *tps)
goto out;
}

for_each_event(dir, dent, tps) {
for_each_event_tps(dir, dent, tps) {
if (strcmp(dent->d_name, "ftrace") == 0 ||
!system_in_tp_list(dent->d_name, tps))
continue;
Expand All @@ -289,7 +289,7 @@ static int record_event_files(struct tracepoint_path *tps)
}

rewinddir(dir);
for_each_event(dir, dent, tps) {
for_each_event_tps(dir, dent, tps) {
if (strcmp(dent->d_name, "ftrace") == 0 ||
!system_in_tp_list(dent->d_name, tps))
continue;
Expand Down

0 comments on commit d2e31d7

Please sign in to comment.