linux-stable/tools/perf
Arnaldo Carvalho de Melo 443a70541c perf tools: Output feature detection's gcc output to a file
So that we can debug feature detection problems.

It will appear on $(OUTPUT)feature-checks/.make-libbabeltrace.output,
using the libbabeltrace feature test.

Whole process:

  [acme@ssdandy linux]$ make -C tools/perf install-bin
  make: Entering directory `/home/acme/git/linux/tools/perf'
    BUILD:   Doing 'make -j8' parallel build
  config/Makefile:425: No libunwind found. Please install libunwind-dev[el] >= 1.1 and/or set LIBUNWIND_DIR
  config/Makefile:709: No libbabeltrace found, disables 'perf data' CTF format support, please install libbabeltrace-dev[el]/libbabeltrace-ctf-dev

  Auto-detecting system features:
  ...                         dwarf: [ on  ]
  ...                         glibc: [ on  ]
  ...                          gtk2: [ on  ]
  ...                      libaudit: [ on  ]
  ...                        libbfd: [ on  ]
  ...                        libelf: [ on  ]
  ...                       libnuma: [ on  ]
  ...                       libperl: [ on  ]
  ...                     libpython: [ on  ]
  ...                      libslang: [ on  ]
  ...                     libunwind: [ OFF ]
  ...            libdw-dwarf-unwind: [ on  ]
  ...                 libbabeltrace: [ OFF ]
  <SNIP>
  [acme@ssdandy linux]$ find tools/perf -name ".make-*.output" | grep lib | tail -5
  tools/perf/config/feature-checks/.make-libdw-dwarf-unwind.output
  tools/perf/config/feature-checks/.make-libbabeltrace.output
  tools/perf/config/feature-checks/.make-zlib.output
  tools/perf/config/feature-checks/.make-liberty.output
  tools/perf/config/feature-checks/.make-liberty-z.output
  [acme@ssdandy linux]$
  [acme@ssdandy linux]$ cat tools/perf/config/feature-checks/.make-libbabeltrace.output
  make[1]: Entering directory `/home/acme/git/linux/tools/perf/config/feature-checks'
  gcc -MD  -Wall -Werror -o test-libbabeltrace.bin test-libbabeltrace.c -Wl,-z,noexecstack  -lbabeltrace-ctf # -lbabeltrace provided by
  test-libbabeltrace.c:2:42: fatal error: babeltrace/ctf-writer/writer.h: No such file or directory
    #include <babeltrace/ctf-writer/writer.h>
                                          ^
  compilation terminated.
  make[1]: *** [test-libbabeltrace.bin] Error 1
  make[1]: Leaving directory `/home/acme/git/linux/tools/perf/config/feature-checks'
  [acme@ssdandy linux]$

So the libbabeltrace feature will not be builtin, but if we do what is required for it
to be built, namely point where we have it installed:

  [acme@ssdandy linux]$ time make -C tools/perf LIBBABELTRACE_DIR=/opt/libbabeltrace install-bin
  make: Entering directory `/home/acme/git/linux/tools/perf'
    BUILD:   Doing 'make -j8' parallel build
  config/Makefile:425: No libunwind found. Please install libunwind-dev[el] >= 1.1 and/or set LIBUNWIND_DIR

  Auto-detecting system features:
  ...                         dwarf: [ on  ]
  ...                         glibc: [ on  ]
  ...                          gtk2: [ on  ]
  ...                      libaudit: [ on  ]
  ...                        libbfd: [ on  ]
  ...                        libelf: [ on  ]
  ...                       libnuma: [ on  ]
  ...                       libperl: [ on  ]
  ...                     libpython: [ on  ]
  ...                      libslang: [ on  ]
  ...                     libunwind: [ OFF ]
  ...            libdw-dwarf-unwind: [ on  ]
  ...                 libbabeltrace: [ on  ]
  ...                          zlib: [ on  ]
  ...     DWARF post unwind library: libdw
  <SNIP>
  [acme@ssdandy linux]$ find tools/perf -name ".make-libbabel*.output" | grep lib | tail -5
  tools/perf/config/feature-checks/.make-libbabeltrace.output
  [acme@ssdandy linux]$ cat tools/perf/config/feature-checks/.make-libbabeltrace.output
  make[1]: Entering directory `/home/acme/git/linux/tools/perf/config/feature-checks'
  gcc -MD -I/opt/libbabeltrace/include -Wall -Werror -o test-libbabeltrace.bin test-libbabeltrace.c -Wl,-z,noexecstack -L/opt/libbabeltrace/lib -lbabeltrace-ctf # -lbabeltrace provided by
  make[1]: Leaving directory `/home/acme/git/linux/tools/perf/config/feature-checks'
  [acme@ssdandy linux]$

Acked-by: Jiri Olsa <jolsa@kernel.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jeremie Galarneau <jgalar@efficios.com>
Cc: Namhyung Kim <namhyung@gmail.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: Tom Zanussi <tzanussi@gmail.com>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/n/tip-h53xwueqwdeeiqcv9f50nqqb@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2015-03-12 12:39:57 -03:00
..
arch perf build: Add arch sparc objects building 2015-02-12 13:22:01 -03:00
bench Merge 'tip/perf/urgent' into perf/core to pick fixes 2015-03-02 11:45:49 -03:00
config perf tools: Output feature detection's gcc output to a file 2015-03-12 12:39:57 -03:00
Documentation perf record: Document --group option 2015-03-02 12:04:45 -03:00
python perf python: Remove duplicate TID bit from mask 2013-08-07 17:35:25 -03:00
scripts perf build: Add scripts objects building 2015-02-12 11:49:53 -03:00
tests perf build: Add tests objects building 2015-02-12 11:40:32 -03:00
ui perf tools: Reference count struct thread 2015-03-03 00:17:08 -03:00
util perf probe: Allow weak symbols to be probed 2015-03-12 12:39:55 -03:00
.gitignore perf tools: Add PERF-FEATURES to the .gitignore file 2015-03-02 12:06:20 -03:00
Build perf tools: Add new 'perf data' command 2015-02-25 12:42:25 -03:00
builtin-annotate.c perf ordered_events: Shorten function signatures 2015-03-11 10:17:09 -03:00
builtin-bench.c perf bench: Add --repeat option 2014-06-19 16:13:15 -03:00
builtin-buildid-cache.c perf buildid-cache: Show usage with incorrect params 2015-02-27 15:52:40 -03:00
builtin-buildid-list.c perf ordered_events: Shorten function signatures 2015-03-11 10:17:09 -03:00
builtin-data.c perf data: Fix sentinel setting for data_cmds array 2015-02-27 10:43:18 -03:00
builtin-diff.c perf ordered_events: Shorten function signatures 2015-03-11 10:17:09 -03:00
builtin-evlist.c perf tools: Modify error code for when perf_session__new() fails 2014-09-26 12:32:58 -03:00
builtin-help.c perf help: Use strerror_r instead of strerror 2014-08-15 13:08:26 -03:00
builtin-inject.c perf tools: tool->finished_round() doesn't need perf_session 2015-03-12 12:39:49 -03:00
builtin-kmem.c perf ordered_events: Shorten function signatures 2015-03-11 10:17:09 -03:00
builtin-kvm.c perf tools: tool->finished_round() doesn't need perf_session 2015-03-12 12:39:49 -03:00
builtin-list.c perf list: Extend raw-dump to certain kind of events 2015-02-27 15:52:24 -03:00
builtin-lock.c perf ordered_events: Shorten function signatures 2015-03-11 10:17:09 -03:00
builtin-mem.c perf ordered_events: Shorten function signatures 2015-03-11 10:17:09 -03:00
builtin-probe.c perf probe: Add --quiet option to suppress output result message 2014-10-29 10:32:49 -02:00
builtin-record.c perf ordered_events: Shorten function signatures 2015-03-11 10:17:09 -03:00
builtin-report.c perf ordered_events: Shorten function signatures 2015-03-11 10:17:09 -03:00
builtin-sched.c perf ordered_events: Shorten function signatures 2015-03-11 10:17:09 -03:00
builtin-script.c perf ordered_events: Shorten function signatures 2015-03-11 10:17:09 -03:00
builtin-stat.c perf stat: Report unsupported events properly 2015-03-02 11:51:17 -03:00
builtin-timechart.c perf ordered_events: Shorten function signatures 2015-03-11 10:17:09 -03:00
builtin-top.c perf evlist: Adopt events_stats from perf_session 2015-02-22 22:22:57 -03:00
builtin-trace.c perf ordered_events: Shorten function signatures 2015-03-11 10:17:09 -03:00
builtin.h perf tools: Add new 'perf data' command 2015-02-25 12:42:25 -03:00
command-list.txt perf tools: Add new 'perf data' command 2015-02-25 12:42:25 -03:00
CREDITS
design.txt perf tools: Update some code references in design.txt 2014-03-18 18:17:06 -03:00
Makefile perf tools: Compare JOBS to 0 after grep 2015-03-02 11:51:00 -03:00
Makefile.perf perf tools: Output feature detection's gcc output to a file 2015-03-12 12:39:57 -03:00
MANIFEST tools build: Add new build support 2015-02-11 18:30:03 -03:00
perf-archive.sh perf archive: Make 'f' the last parameter for tar 2012-09-17 13:10:42 -03:00
perf-completion.sh perf tools: Fix the bash completion problem of 'perf --*' 2015-02-27 15:52:28 -03:00
perf-read-vdso.c perf tools: Build programs to copy 32-bit compatibility 2014-10-29 10:32:48 -02:00
perf-sys.h perf tools: Avoid build splat for syscall numbers with uclibc 2015-01-16 17:49:29 -03:00
perf-with-kcore.sh perf tools: Add perf-with-kcore script 2014-09-17 17:08:08 -03:00
perf.c perf tools: Fix the bash completion problem of 'perf --*' 2015-02-27 15:52:28 -03:00
perf.h perf record: Support recording running/enabled time 2015-02-25 12:42:23 -03:00