summaryrefslogtreecommitdiffstats
path: root/tools/perf/tests/mmap-basic.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2014-08-18 10:14:43 +0200
committerIngo Molnar <mingo@kernel.org>2014-08-18 10:14:43 +0200
commitaf924aa35129edf338ebc8da6a4eae08cf7cb297 (patch)
tree45417e729d0b4f0a346963f6b76e34687df2aa5a /tools/perf/tests/mmap-basic.c
parentf373da34282560c60f0c197690eecb1b2dc49fc0 (diff)
parent759e612bf96627b64fcafe4174b3f6f2dedf2c0d (diff)
Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core
Pull perf/core improvements and fixes from Arnaldo Carvalho de Melo: User visible changes: * Warn user to rebuild target with debuginfo in 'perf probe' (Masami Hiramatsu) * Don't truncate Intel style addresses in 'annotate'. (Alex Converse) Infrastructure changes: * Annotate PMU related list_head members with type info. (Cody P Schafer) * Add the triplet used for arm64 by Android (Elliott Hughes) * Replace thread unsafe strerror() with strerror_r() accross the whole tools/perf/ tree (Masami Hiramatsu) Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'tools/perf/tests/mmap-basic.c')
-rw-r--r--tools/perf/tests/mmap-basic.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/tools/perf/tests/mmap-basic.c b/tools/perf/tests/mmap-basic.c
index 142263492f6..9b9622a3393 100644
--- a/tools/perf/tests/mmap-basic.c
+++ b/tools/perf/tests/mmap-basic.c
@@ -31,6 +31,7 @@ int test__basic_mmap(void)
unsigned int nr_events[nsyscalls],
expected_nr_events[nsyscalls], i, j;
struct perf_evsel *evsels[nsyscalls], *evsel;
+ char sbuf[STRERR_BUFSIZE];
threads = thread_map__new(-1, getpid(), UINT_MAX);
if (threads == NULL) {
@@ -49,7 +50,7 @@ int test__basic_mmap(void)
sched_setaffinity(0, sizeof(cpu_set), &cpu_set);
if (sched_setaffinity(0, sizeof(cpu_set), &cpu_set) < 0) {
pr_debug("sched_setaffinity() failed on CPU %d: %s ",
- cpus->map[0], strerror(errno));
+ cpus->map[0], strerror_r(errno, sbuf, sizeof(sbuf)));
goto out_free_cpus;
}
@@ -79,7 +80,7 @@ int test__basic_mmap(void)
if (perf_evsel__open(evsels[i], cpus, threads) < 0) {
pr_debug("failed to open counter: %s, "
"tweak /proc/sys/kernel/perf_event_paranoid?\n",
- strerror(errno));
+ strerror_r(errno, sbuf, sizeof(sbuf)));
goto out_delete_evlist;
}
@@ -89,7 +90,7 @@ int test__basic_mmap(void)
if (perf_evlist__mmap(evlist, 128, true) < 0) {
pr_debug("failed to mmap events: %d (%s)\n", errno,
- strerror(errno));
+ strerror_r(errno, sbuf, sizeof(sbuf)));
goto out_delete_evlist;
}