1
0
Fork 0
alistair23-linux/tools/perf
Arnaldo Carvalho de Melo df35e878d0 perf bench: Share some global variables to fix build with gcc 10
commit e4d9b04b97 upstream.

Noticed with gcc 10 (fedora rawhide) that those variables were not being
declared as static, so end up with:

  ld: /tmp/build/perf/bench/epoll-wait.o:/git/perf/tools/perf/bench/epoll-wait.c:93: multiple definition of `end'; /tmp/build/perf/bench/futex-hash.o:/git/perf/tools/perf/bench/futex-hash.c:40: first defined here
  ld: /tmp/build/perf/bench/epoll-wait.o:/git/perf/tools/perf/bench/epoll-wait.c:93: multiple definition of `start'; /tmp/build/perf/bench/futex-hash.o:/git/perf/tools/perf/bench/futex-hash.c:40: first defined here
  ld: /tmp/build/perf/bench/epoll-wait.o:/git/perf/tools/perf/bench/epoll-wait.c:93: multiple definition of `runtime'; /tmp/build/perf/bench/futex-hash.o:/git/perf/tools/perf/bench/futex-hash.c:40: first defined here
  ld: /tmp/build/perf/bench/epoll-ctl.o:/git/perf/tools/perf/bench/epoll-ctl.c:38: multiple definition of `end'; /tmp/build/perf/bench/futex-hash.o:/git/perf/tools/perf/bench/futex-hash.c:40: first defined here
  ld: /tmp/build/perf/bench/epoll-ctl.o:/git/perf/tools/perf/bench/epoll-ctl.c:38: multiple definition of `start'; /tmp/build/perf/bench/futex-hash.o:/git/perf/tools/perf/bench/futex-hash.c:40: first defined here
  ld: /tmp/build/perf/bench/epoll-ctl.o:/git/perf/tools/perf/bench/epoll-ctl.c:38: multiple definition of `runtime'; /tmp/build/perf/bench/futex-hash.o:/git/perf/tools/perf/bench/futex-hash.c:40: first defined here
  make[4]: *** [/git/perf/tools/build/Makefile.build:145: /tmp/build/perf/bench/perf-in.o] Error 1

Prefix those with bench__ and add them to bench/bench.h, so that we can
share those on the tools needing to access those variables from signal
handlers.

Acked-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Davidlohr Bueso <dave@stgolabs.net>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: http://lore.kernel.org/lkml/20200303155811.GD13702@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-08-05 09:59:52 +02:00
..
Documentation perf docs: Correct and clarify jitdump spec 2019-09-30 17:29:51 -03:00
arch perf tools: Fix record failure when mixed with ARM SPE event 2020-08-05 09:59:49 +02:00
bench perf bench: Share some global variables to fix build with gcc 10 2020-08-05 09:59:52 +02:00
examples/bpf perf augmented_raw_syscalls: Reduce perf_event_output() boilerplate 2019-08-26 11:58:29 -03:00
include/bpf perf include bpf: Add bpf_tail_call() prototype 2019-07-29 18:34:40 -03:00
jvmti perf jvmti: Link against tools/lib/ctype.h to have weak strlcpy() 2019-10-15 11:47:38 -03:00
lib libperf: Add perf_evlist__poll() function 2019-09-25 09:51:49 -03:00
pmu-events perf vendor events s390: Remove name from L1D_RO_EXCL_WRITES description 2020-01-17 19:48:30 +01:00
python treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 407 2019-06-05 17:37:14 +02:00
scripts perf scripts python: exported-sql-viewer.py: Fix unexpanded 'Find' result 2020-07-16 08:16:47 +02:00
tests perf tests bp_account: Make global variable static 2020-08-05 09:59:52 +02:00
trace perf trace beauty ioctl: Fix off-by-one error in cmd->string table 2019-08-26 11:58:29 -03:00
ui perf report TUI: Fix segmentation fault in perf_evsel__hists_browse() 2020-07-16 08:16:38 +02:00
util perf env: Do not return pointers to local variables 2020-08-05 09:59:52 +02:00
.gitignore perf: Update .gitignore file 2019-08-31 22:27:52 -03:00
Build perf tools: Rename build libperf to perf 2019-02-14 15:18:08 -03:00
CREDITS
MANIFEST tools lib: Adopt zalloc()/zfree() from tools/perf 2019-07-09 10:13:26 -03:00
Makefile tools: Let O= makes handle a relative path with -C option 2020-04-01 11:02:00 +02:00
Makefile.config perf tools: Support Python 3.8+ in Makefile 2020-04-17 10:50:21 +02:00
Makefile.perf libtraceevent: Move traceevent plugins in its own subdirectory 2019-09-25 09:51:43 -03:00
builtin-annotate.c perf session: Return error code for perf_session__new() function on failure 2019-09-20 15:58:11 -03:00
builtin-bench.c perf tools: Remove perf.h from source files not needing it 2019-08-29 17:38:32 -03:00
builtin-buildid-cache.c perf session: Return error code for perf_session__new() function on failure 2019-09-20 15:58:11 -03:00
builtin-buildid-list.c perf session: Return error code for perf_session__new() function on failure 2019-09-20 15:58:11 -03:00
builtin-c2c.c perf c2c: Fix return type for histogram sorting comparision functions 2020-02-05 21:22:40 +00:00
builtin-config.c perf tools: Remove util.h from where it is not needed 2019-09-20 09:19:20 -03:00
builtin-data.c perf debug: Remove needless include directives from debug.h 2019-08-31 19:10:19 -03:00
builtin-diff.c perf diff: Use llabs() with 64-bit values 2020-01-04 19:18:26 +01:00
builtin-evlist.c perf evsel: Introduce evsel_fprintf.h 2019-09-25 16:26:34 -03:00
builtin-ftrace.c perf auxtrace: Uninline functions that touch perf_session 2019-08-31 22:24:10 -03:00
builtin-help.c perf debug: Remove needless include directives from debug.h 2019-08-31 19:10:19 -03:00
builtin-inject.c perf session: Return error code for perf_session__new() function on failure 2019-09-20 15:58:11 -03:00
builtin-kallsyms.c perf dsos: Move the dsos struct and its methods to separate source files 2019-08-31 22:24:10 -03:00
builtin-kmem.c perf kmem: Fix memory leak in compact_gfp_flags() 2019-10-16 10:08:32 -03:00
builtin-kvm.c perf tools: Propagate get_cpuid() error 2019-09-30 17:29:54 -03:00
builtin-list.c perf list: Allow plurals for metric, metricgroup 2019-09-25 09:51:42 -03:00
builtin-lock.c perf session: Return error code for perf_session__new() function on failure 2019-09-20 15:58:11 -03:00
builtin-mem.c perf session: Return error code for perf_session__new() function on failure 2019-09-20 15:58:11 -03:00
builtin-probe.c perf probe: Do not show the skipped events 2020-06-22 09:31:27 +02:00
builtin-record.c libperf: Add perf_evlist__poll() function 2019-09-25 09:51:49 -03:00
builtin-report.c perf report: Fix NULL pointer dereference in hists__fprintf_nr_sample_events() 2020-06-24 17:50:45 +02:00
builtin-sched.c perf evsel: Introduce evsel_fprintf.h 2019-09-25 16:26:34 -03:00
builtin-script.c perf script: Fix --reltime with --time 2020-01-23 08:23:01 +01:00
builtin-stat.c libperf: Move 'sample_id' from 'struct evsel' to 'struct perf_evsel' 2019-09-25 09:51:47 -03:00
builtin-timechart.c perf session: Return error code for perf_session__new() function on failure 2019-09-20 15:58:11 -03:00
builtin-top.c perf evsel: Move config terms to a separate header 2019-09-25 16:26:40 -03:00
builtin-trace.c perf evsel: Introduce evsel_fprintf.h 2019-09-25 16:26:34 -03:00
builtin-version.c perf symbols: Move mem_info and branch_info out of symbol.h 2019-08-31 22:27:48 -03:00
builtin.h perf tools: Remove needless util.h include from builtin.h 2019-08-28 17:19:34 -03:00
check-headers.sh tools headers uapi: Sync linux/fs.h with the kernel sources 2019-09-30 17:29:22 -03:00
command-list.txt perf help: Add missing subcommand `version` 2018-09-19 14:53:36 -03:00
design.txt perf/doc: Update design.txt for exclude_{host|guest} flags 2019-01-21 11:01:18 +01:00
perf-archive.sh
perf-completion.sh perf tools: Auto-complete for events with ':' 2017-12-27 12:16:00 -03:00
perf-read-vdso.c perf tools: Make find_vdso_map() more modular 2019-01-08 13:28:13 -03:00
perf-sys.h perf tools: Make usage of test_attr__* optional for perf-sys.h 2019-10-31 21:38:41 +01:00
perf-with-kcore.sh Merge branch 'x86/cpu' into perf/core, to pick up dependent changes 2019-06-17 12:29:16 +02:00
perf.c libperf: Merge libperf_set_print() into libperf_init() 2019-09-25 09:51:49 -03:00
perf.h perf time-utils: Adopt rdclock() from perf.h 2019-08-29 17:38:32 -03:00