From 14cbfbeb76540cc0c53fbb0ba34b3a4900ebe40f Mon Sep 17 00:00:00 2001 From: Namhyung Kim Date: Thu, 7 Jan 2016 20:41:53 +0900 Subject: perf report: Show random usage tip on the help line Currently perf report only shows a help message "For a higher level overview, try: perf report --sort comm,dso" unconditionally (even if the sort keys were used). Add more help tips and show randomly. Load tips from ${prefix}/share/doc/perf-tip/tips.txt file. $ perf report | tail 0.10% swapper [kernel.vmlinux] [k] irq_exit 0.09% swapper [kernel.vmlinux] [k] flush_smp_call_function_queue 0.08% swapper [kernel.vmlinux] [k] native_write_msr_safe 0.03% swapper [kernel.vmlinux] [k] group_sched_in 0.01% perf [kernel.vmlinux] [k] native_write_msr_safe # # (Tip: Search options using a keyword: perf report -h ) # Signed-off-by: Namhyung Kim Acked-by: Ingo Molnar Cc: Andi Kleen Cc: David Ahern Cc: Jiri Olsa Cc: Masami Hiramatsu Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Wang Nan Link: http://lkml.kernel.org/r/1452166913-27046-1-git-send-email-namhyung@kernel.org [ Renamed it to perf_tip() and the parameter dirname to dirpath to fix the build on older distros ] Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/Documentation/tips.txt | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 tools/perf/Documentation/tips.txt (limited to 'tools/perf/Documentation/tips.txt') diff --git a/tools/perf/Documentation/tips.txt b/tools/perf/Documentation/tips.txt new file mode 100644 index 000000000000..a1c10e360db5 --- /dev/null +++ b/tools/perf/Documentation/tips.txt @@ -0,0 +1,14 @@ +For a higher level overview, try: perf report --sort comm,dso +Sample related events with: perf record -e '{cycles,instructions}:S' +Compare performance results with: perf diff [ ] +Boolean options have negative forms, e.g.: perf report --no-children +Customize output of perf script with: perf script -F event,ip,sym +Generate a script for your data: perf script -g +Save output of perf stat using: perf stat record +Create an archive with symtabs to analyse on other machine: perf archive +Search options using a keyword: perf report -h +Use parent filter to see specific call path: perf report -p +List events using substring match: perf list +To see list of saved events and attributes: perf evlist -v +Use --symfs if your symbol files are in non-standard locations +To see callchains in a more compact form: perf report -g folded -- cgit v1.2.3