Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 232299
b: refs/heads/master
c: ffb5e0f
h: refs/heads/master
i:
  232297: db65efd
  232295: 8f7a903
v: v3
  • Loading branch information
Han Pingtian authored and Arnaldo Carvalho de Melo committed Jan 21, 2011
1 parent 5a283ed commit 9353a98
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b2f8fb237e9cc407a02aca401369c15babae35dd
refs/heads/master: ffb5e0fb44d0829021a51f972df90166bc9b700e
13 changes: 9 additions & 4 deletions trunk/tools/perf/builtin-test.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

/*
Expand All @@ -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;
}
}
Expand Down

0 comments on commit 9353a98

Please sign in to comment.