aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/cloexec.h (follow)
AgeCommit message (Collapse)AuthorFilesLines
2015-08-05perf tools: Fix build errors with mipsel-linux-uclibc compilerPetri Gynther1-1/+1
linux/tools$ make ARCH=mips CROSS_COMPILE=mipsel-linux- perf ... config/Makefile:256: *** No gnu/libc-version.h found, please install glibc-dev[el]. Stop. make[1]: *** [all] Error 2 make: *** [perf] Error 2 ... In file included from builtin-sched.c:13:0: util/cloexec.h:8:12: error: redundant redeclaration of ‘sched_getcpu’ [-Werror=redundant-decls] extern int sched_getcpu(void) __THROW; mipsel-buildroot-linux-uclibc/sysroot/usr/include/bits/sched.h:88:12: note: previous declaration of ‘sched_getcpu’ was here extern int sched_getcpu (void) __THROW; uclibc info: sysroot/usr/include/bits/uClibc_config.h __UCLIBC_MAJOR__ 0 __UCLIBC_MINOR__ 9 __UCLIBC_SUBLEVEL__ 33 sysroot/usr/include/features.h __UCLIBC__ 1 __GLIBC__ 2 __GLIBC_MINOR__ 2 Signed-off-by: Petri Gynther <pgynther@google.com> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Link: http://lkml.kernel.org/r/1438735081-24131-1-git-send-email-pgynther@google.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2015-03-24perf tools: Work around lack of sched_getcpu in glibc < 2.6.Vinson Lee1-0/+6
This patch fixes this build error with glibc < 2.6. CC util/cloexec.o cc1: warnings being treated as errors util/cloexec.c: In function ‘perf_flag_probe’: util/cloexec.c:24: error: implicit declaration of function ‘sched_getcpu’ util/cloexec.c:24: error: nested extern declaration of ‘sched_getcpu’ make: *** [util/cloexec.o] Error 1 Signed-off-by: Vinson Lee <vlee@twitter.com> Acked-by: Jiri Olsa <jolsa@kernel.org> Acked-by: Namhyung Kim <namhyung@kernel.org> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Yann Droneaud <ydroneaud@opteya.com> Cc: stable@vger.kernel.org # 3.18+ Link: http://lkml.kernel.org/r/1427137761-16119-1-git-send-email-vlee@twopensource.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2014-07-18perf tools: Enable close-on-exec flag on perf file descriptorYann Droneaud1-0/+6
In commit a21b0b354d4a ('perf: Introduce a flag to enable close-on-exec in perf_event_open()'), flag PERF_FLAG_FD_CLOEXEC was added to perf_event_open(2) syscall to allows userspace to atomically enable close-on-exec behavor when creating the file descriptor. This patch makes perf tools use the new flag if supported by the kernel, so that the event file descriptors got automatically closed if perf tool exec a sub-command. Signed-off-by: Yann Droneaud <ydroneaud@opteya.com> Cc: Andi Kleen <ak@linux.intel.com> Cc: Arnaldo Carvalho de Melo <acme@ghostprotocols.net> Cc: Ingo Molnar <mingo@kernel.org> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/n/1404160127-7475-1-git-send-email-ydroneaud@opteya.com Signed-off-by: Jiri Olsa <jolsa@kernel.org>