Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

perf callchain: Fixup help/config for no-unwinding

Since 841e3558b2d ("perf callchain: Recording 'dwarf' callchains do not
need DWARF unwinding support"), --call-graph dwarf is allowed in 'perf
record' even without unwind support. A couple of other places don't
reflect this yet though: the help text should list dwarf as a valid
record mode and the dump_size config should be respected too.

Signed-off-by: Rabin Vincent <rabinv@axis.com>
Cc: He Kuang <hekuang@huawei.com>
Fixes: 841e3558b2de ("perf callchain: Recording 'dwarf' callchains do not need DWARF unwinding support")
Link: http://lkml.kernel.org/r/1470837148-7642-1-git-send-email-rabin.vincent@axis.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

authored by

Rabin Vincent and committed by
Arnaldo Carvalho de Melo
c56cb33b 91a79e5f

-6
-2
tools/perf/util/callchain.c
··· 193 193 194 194 if (!strcmp(var, "record-mode")) 195 195 return parse_callchain_record_opt(value, &callchain_param); 196 - #ifdef HAVE_DWARF_UNWIND_SUPPORT 197 196 if (!strcmp(var, "dump-size")) { 198 197 unsigned long size = 0; 199 198 int ret; ··· 202 203 203 204 return ret; 204 205 } 205 - #endif 206 206 if (!strcmp(var, "print-type")) 207 207 return parse_callchain_mode(value); 208 208 if (!strcmp(var, "order"))
-4
tools/perf/util/callchain.h
··· 11 11 12 12 #define CALLCHAIN_HELP "setup and enables call-graph (stack chain/backtrace):\n\n" 13 13 14 - #ifdef HAVE_DWARF_UNWIND_SUPPORT 15 14 # define RECORD_MODE_HELP HELP_PAD "record_mode:\tcall graph recording mode (fp|dwarf|lbr)\n" 16 - #else 17 - # define RECORD_MODE_HELP HELP_PAD "record_mode:\tcall graph recording mode (fp|lbr)\n" 18 - #endif 19 15 20 16 #define RECORD_SIZE_HELP \ 21 17 HELP_PAD "record_size:\tif record_mode is 'dwarf', max size of stack recording (<bytes>)\n" \