perf parse-events: Use get/put_events_file()
authorArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 17 May 2018 17:27:29 +0000 (14:27 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 17 May 2018 17:49:36 +0000 (14:49 -0300)
commit25a7d914274de38637c5199342eb90a297361386
tree58d563fe50180ff95dd71b2be4081aa750348e05
parentc02cab228e44aacf161642b63779971f8e39993b
perf parse-events: Use get/put_events_file()

Instead of accessing the trace_events_path variable directly, that may
not have been properly initialized wrt detecting where tracefs is
mounted.

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-id7hzn1ydgkxbumeve5wapqz@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/tests/parse-events.c
tools/perf/util/parse-events.c
tools/perf/util/trace-event.c