]> Git Repo - linux.git/commitdiff
perf bench numa: Fix to show proper convergence stats
authorSrikar Dronamraju <[email protected]>
Wed, 24 Jun 2015 11:10:04 +0000 (16:40 +0530)
committerArnaldo Carvalho de Melo <[email protected]>
Thu, 25 Jun 2015 15:28:35 +0000 (12:28 -0300)
With commit: e1e455f4f4d3 (perf tools: Work around lack of sched_getcpu
in glibc < 2.6), perf_bench numa mem with -c or -m option is not able to
correctly calculate convergence.

With the above commit, sched_getcpu always seems to return -1. The
intention of commit e1e455f was to add a sched_getcpu in glibc < 2.6.
Hence keep the sched_getcpu definition under an ifdef.

This regression happened occurred between v4.0 and v4.1

Signed-off-by: Srikar Dronamraju <[email protected]>
Acked-by: Ingo Molnar <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Masami Hiramatsu <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Vinson Lee <[email protected]>
Fixes: e1e455f4f4d3 ("perf tools: Work around lack of sched_getcpu in glibc < 2.6")
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
tools/perf/util/cloexec.c

index 85b523885f9d70d3e708cb0688e4933b43a1f388..2babddaa24813102c0c9d7525ec8ab615b621775 100644 (file)
@@ -7,11 +7,15 @@
 
 static unsigned long flag = PERF_FLAG_FD_CLOEXEC;
 
+#ifdef __GLIBC_PREREQ
+#if !__GLIBC_PREREQ(2, 6)
 int __weak sched_getcpu(void)
 {
        errno = ENOSYS;
        return -1;
 }
+#endif
+#endif
 
 static int perf_flag_probe(void)
 {
This page took 0.058306 seconds and 4 git commands to generate.