diff options
-rw-r--r-- | tools/perf/builtin-record.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c index 8c029fe2e22c..e9231659754d 100644 --- a/tools/perf/builtin-record.c +++ b/tools/perf/builtin-record.c | |||
@@ -31,15 +31,6 @@ | |||
31 | #include <sched.h> | 31 | #include <sched.h> |
32 | #include <sys/mman.h> | 32 | #include <sys/mman.h> |
33 | 33 | ||
34 | #define CALLCHAIN_HELP "do call-graph (stack chain/backtrace) recording: " | ||
35 | |||
36 | #ifdef LIBUNWIND_SUPPORT | ||
37 | static unsigned long default_stack_dump_size = 8192; | ||
38 | static char callchain_help[] = CALLCHAIN_HELP "[fp] dwarf"; | ||
39 | #else | ||
40 | static char callchain_help[] = CALLCHAIN_HELP "[fp]"; | ||
41 | #endif | ||
42 | |||
43 | enum write_mode_t { | 34 | enum write_mode_t { |
44 | WRITE_FORCE, | 35 | WRITE_FORCE, |
45 | WRITE_APPEND | 36 | WRITE_APPEND |
@@ -868,6 +859,8 @@ parse_callchain_opt(const struct option *opt __maybe_unused, const char *arg, | |||
868 | #ifdef LIBUNWIND_SUPPORT | 859 | #ifdef LIBUNWIND_SUPPORT |
869 | /* Dwarf style */ | 860 | /* Dwarf style */ |
870 | } else if (!strncmp(name, "dwarf", sizeof("dwarf"))) { | 861 | } else if (!strncmp(name, "dwarf", sizeof("dwarf"))) { |
862 | const unsigned long default_stack_dump_size = 8192; | ||
863 | |||
871 | ret = 0; | 864 | ret = 0; |
872 | rec->opts.call_graph = CALLCHAIN_DWARF; | 865 | rec->opts.call_graph = CALLCHAIN_DWARF; |
873 | rec->opts.stack_dump_size = default_stack_dump_size; | 866 | rec->opts.stack_dump_size = default_stack_dump_size; |
@@ -930,6 +923,14 @@ static struct perf_record record = { | |||
930 | .file_new = true, | 923 | .file_new = true, |
931 | }; | 924 | }; |
932 | 925 | ||
926 | #define CALLCHAIN_HELP "do call-graph (stack chain/backtrace) recording: " | ||
927 | |||
928 | #ifdef LIBUNWIND_SUPPORT | ||
929 | static const char callchain_help[] = CALLCHAIN_HELP "[fp] dwarf"; | ||
930 | #else | ||
931 | static const char callchain_help[] = CALLCHAIN_HELP "[fp]"; | ||
932 | #endif | ||
933 | |||
933 | /* | 934 | /* |
934 | * XXX Will stay a global variable till we fix builtin-script.c to stop messing | 935 | * XXX Will stay a global variable till we fix builtin-script.c to stop messing |
935 | * with it and switch to use the library functions in perf_evlist that came | 936 | * with it and switch to use the library functions in perf_evlist that came |