if (evsel__open(evsel, cpus, threads) < 0) {
pr_debug("failed to open counter: %s, " "tweak /proc/sys/kernel/perf_event_paranoid?\n",
str_error_r(errno, sbuf, sizeof(sbuf)));
err = TEST_SKIP; goto out_evsel_delete;
}
perf_cpu_map__for_each_cpu(cpu, idx, cpus) { unsignedint ncalls = nr_openat_calls + idx; /* * XXX eventually lift this restriction in a way that * keeps perf building on older glibc installations * without CPU_ALLOC. 1024 cpus in 2010 still seems * a reasonable upper limit tho :-)
*/ if (cpu.cpu >= CPU_SETSIZE) {
pr_debug("Ignoring CPU %d\n", cpu.cpu); continue;
}
CPU_SET(cpu.cpu, &cpu_set); if (sched_setaffinity(0, sizeof(cpu_set), &cpu_set) < 0) {
pr_debug("sched_setaffinity() failed on CPU %d: %s ",
cpu.cpu,
str_error_r(errno, sbuf, sizeof(sbuf))); goto out_close_fd;
} for (i = 0; i < ncalls; ++i) {
fd = openat(0, "/etc/passwd", O_RDONLY);
close(fd);
}
CPU_CLR(cpu.cpu, &cpu_set);
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.