aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/builtin-report.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-01-14 11:39:09 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2016-01-14 11:39:09 -0800
commit747a9b0a08ae300b99b8aa7861bd3609f3b3e782 (patch)
treec76ce3e65c4066120dc2918b8db1bc4100bdf272 /tools/perf/builtin-report.c
parentMerge branch 'i2c/for-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux (diff)
parentMerge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent (diff)
downloadlinux-dev-747a9b0a08ae300b99b8aa7861bd3609f3b3e782.tar.xz
linux-dev-747a9b0a08ae300b99b8aa7861bd3609f3b3e782.zip
Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull perf fixes from Ingo Molnar: "Tooling fixes, the biggest patch is one that decouples the kernel's list.h from tooling list.h" * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (23 commits) perf tools: Fallback to srcdir/Documentation/tips.txt perf ui/tui: Print helpline message as is perf tools: Set and pass DOCDIR to builtin-report.c perf tools: Add file_only config option to strlist perf tools: Add more usage tips perf record: Add --buildid-all option tools subcmd: Add missing NORETURN define for parse-options.h tools: Fix formatting of the "make -C tools" help message tools: Make list.h self-sufficient perf tools: Fix mmap2 event allocation in synthesize code perf stat: Fix recort_usage typo perf test: Reset err after using it hold errcode in hist testcases perf test: Fix false TEST_OK result for 'perf test hist' tools build: Add BPF feature check to test-all perf bpf: Fix build breakage due to libbpf tools: Move Makefile.arch from perf/config to tools/scripts perf tools: Fix PowerPC native building perf tools: Fix phony build target for build-test perf tools: Add -lutil in python lib list for broken python-config perf tools: Add missing sources to perf's MANIFEST ...
Diffstat (limited to 'tools/perf/builtin-report.c')
-rw-r--r--tools/perf/builtin-report.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c
index d5a42ee12529..2bf537f190a0 100644
--- a/tools/perf/builtin-report.c
+++ b/tools/perf/builtin-report.c
@@ -28,6 +28,7 @@
#include "util/tool.h"
#include <subcmd/parse-options.h>
+#include <subcmd/exec-cmd.h>
#include "util/parse-events.h"
#include "util/thread.h"
@@ -433,7 +434,14 @@ static int report__browse_hists(struct report *rep)
int ret;
struct perf_session *session = rep->session;
struct perf_evlist *evlist = session->evlist;
- const char *help = perf_tip(TIPDIR);
+ const char *help = perf_tip(system_path(TIPDIR));
+
+ if (help == NULL) {
+ /* fallback for people who don't install perf ;-) */
+ help = perf_tip(DOCDIR);
+ if (help == NULL)
+ help = "Cannot load tips.txt file, please install perf!";
+ }
switch (use_browser) {
case 1: