OSDN Git Service

perf tools: Reuse the path to the tracepoint /events/ directory
authorArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 17 May 2018 17:22:37 +0000 (14:22 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 17 May 2018 17:25:07 +0000 (14:25 -0300)
commitc02cab228e44aacf161642b63779971f8e39993b
tree21bb482dcc116bbbf4a4f89826b39aeeedc78119
parent40c3c0c9ac2befd28df3844dc9efdbadee3af5c0
perf tools: Reuse the path to the tracepoint /events/ directory

When using for_each_event() we needlessly rebuild the whole path to
the tracepoint directory, reuse the dir_path instead, saving some cycles
and reducing the size of the next patch.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: https://lkml.kernel.org/n/tip-54bcs15n0cp6gwcgpc4hptyc@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/parse-events.c