]> git.baikalelectronics.ru Git - kernel.git/commit
perf tools: Add dso__data_get/put_fd()
authorNamhyung Kim <namhyung@kernel.org>
Wed, 20 May 2015 16:03:41 +0000 (01:03 +0900)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 27 May 2015 15:21:44 +0000 (12:21 -0300)
commit487c03e9d38533775a29b50bb5e0ad8ded6151e3
tree56d8b7f278f2dad61c936b981b2844249e48c129
parentf363ef0182ad057a5996d17c0fa488be4bfc0deb
perf tools: Add dso__data_get/put_fd()

Using dso__data_fd() in multi-thread environment is not safe since
returned fd can be closed and/or reused anytime.

So convert it to the dso__data_get/put_fd() pair to protect the access
with lock.

The original dso__data_fd() is deprecated and kept only for testing.

Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1432137821-10853-3-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/tests/dso-data.c
tools/perf/util/dso.c
tools/perf/util/dso.h
tools/perf/util/unwind-libunwind.c