summaryrefslogtreecommitdiff
path: root/tools/perf/builtin-test.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2011-01-22 11:08:52 +0100
committerIngo Molnar <mingo@elte.hu>2011-01-22 11:08:52 +0100
commit01bb2dc4e47639c8e7eddb1718720a051bcdc955 (patch)
tree8ae801b13346c32fbca5555862411c74be902266 /tools/perf/builtin-test.c
parent806839b22cbda90176d7f8d421889bddd7826e93 (diff)
parentffb5e0fb44d0829021a51f972df90166bc9b700e (diff)
downloadlwn-01bb2dc4e47639c8e7eddb1718720a051bcdc955.tar.gz
lwn-01bb2dc4e47639c8e7eddb1718720a051bcdc955.zip
Merge branch 'perf/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux-2.6 into perf/urgent
Diffstat (limited to 'tools/perf/builtin-test.c')
-rw-r--r--tools/perf/builtin-test.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/tools/perf/builtin-test.c b/tools/perf/builtin-test.c
index ed5696198d3d..02958d6a807f 100644
--- a/tools/perf/builtin-test.c
+++ b/tools/perf/builtin-test.c
@@ -380,13 +380,18 @@ static int test__open_syscall_event_on_all_cpus(void)
for (cpu = 0; cpu < cpus->nr; ++cpu) {
unsigned int ncalls = nr_open_calls + cpu;
- CPU_SET(cpu, cpu_set);
- sched_setaffinity(0, cpu_set_size, cpu_set);
+ CPU_SET_S(cpus->map[cpu], cpu_set_size, cpu_set);
+ if (sched_setaffinity(0, cpu_set_size, cpu_set) < 0) {
+ pr_debug("sched_setaffinity() failed on CPU %d: %s ",
+ cpus->map[cpu],
+ strerror(errno));
+ goto out_close_fd;
+ }
for (i = 0; i < ncalls; ++i) {
fd = open("/etc/passwd", O_RDONLY);
close(fd);
}
- CPU_CLR(cpu, cpu_set);
+ CPU_CLR_S(cpus->map[cpu], cpu_set_size, cpu_set);
}
/*
@@ -410,7 +415,7 @@ static int test__open_syscall_event_on_all_cpus(void)
expected = nr_open_calls + cpu;
if (evsel->counts->cpu[cpu].val != expected) {
pr_debug("perf_evsel__read_on_cpu: expected to intercept %d calls on cpu %d, got %Ld\n",
- expected, cpu, evsel->counts->cpu[cpu].val);
+ expected, cpus->map[cpu], evsel->counts->cpu[cpu].val);
goto out_close_fd;
}
}