Skip to contentSkip to conversation

perf callchain: fixup help/config for no-unwinding

PATCH New Rabin Vincent 2 participants 2 messages Aug 10, 2016 – Nov 15, 2016 perf events

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 perf callchain: fixup help/config for no-unwinding

From: Rabin Vincent <[email protected]>

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.

---
 tools/perf/util/callchain.c | 2 --
 tools/perf/util/callchain.h | 4 ----
 2 files changed, 6 deletions(-)
tools/perf/util/callchain.c +0 -2
index 07fd30b..ae58b49 100644
@@ -193,7 +193,6 @@ int perf_callchain_config(const char *var, const char *value)
 
 	if (!strcmp(var, "record-mode"))
 		return parse_callchain_record_opt(value, &callchain_param);
-#ifdef HAVE_DWARF_UNWIND_SUPPORT
 	if (!strcmp(var, "dump-size")) {
 		unsigned long size = 0;
 		int ret;
@@ -203,7 +202,6 @@ int perf_callchain_config(const char *var, const char *value)
 
 		return ret;
 	}
-#endif
 	if (!strcmp(var, "print-type"))
 		return parse_callchain_mode(value);
 	if (!strcmp(var, "order"))
tools/perf/util/callchain.h +0 -4
index 13e7554..47cfd10 100644
@@ -11,11 +11,7 @@
 
 #define CALLCHAIN_HELP "setup and enables call-graph (stack chain/backtrace):\n\n"
 
-#ifdef HAVE_DWARF_UNWIND_SUPPORT
 # define RECORD_MODE_HELP  HELP_PAD "record_mode:\tcall graph recording mode (fp|dwarf|lbr)\n"
-#else
-# define RECORD_MODE_HELP  HELP_PAD "record_mode:\tcall graph recording mode (fp|lbr)\n"
-#endif
 
 #define RECORD_SIZE_HELP						\
 	HELP_PAD "record_size:\tif record_mode is 'dwarf', max size of stack recording (<bytes>)\n" \
Signature · 1 line
2.1.4
#1 lore raw

[tip:perf/core] perf callchain: Fixup help/config for no-unwinding

perf callchain: Fixup help/config for no-unwinding
Commit-ID:  c56cb33b56c13493eeb95612f80e4dd6e35cd109
Gitweb:     http://git.kernel.org/tip/c56cb33b56c13493eeb95612f80e4dd6e35cd109
Author:     Rabin Vincent <[email protected]>
AuthorDate: Wed, 10 Aug 2016 15:52:28 +0200
Committer:  Arnaldo Carvalho de Melo <[email protected]>
CommitDate: Mon, 7 Nov 2016 22:13:47 -0300

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.

Cc He Kuang <[email protected]>
Fixes 841e3558b2de ("perf callchain: Recording 'dwarf' callchains do not need DWARF unwinding support")
---
 tools/perf/util/callchain.c | 2 --
 tools/perf/util/callchain.h | 4 ----
 2 files changed, 6 deletions(-)
tools/perf/util/callchain.c +0 -2
index 07fd30b..ae58b49 100644
@@ -193,7 +193,6 @@ int perf_callchain_config(const char *var, const char *value)
 
 	if (!strcmp(var, "record-mode"))
 		return parse_callchain_record_opt(value, &callchain_param);
-#ifdef HAVE_DWARF_UNWIND_SUPPORT
 	if (!strcmp(var, "dump-size")) {
 		unsigned long size = 0;
 		int ret;
@@ -203,7 +202,6 @@ int perf_callchain_config(const char *var, const char *value)
 
 		return ret;
 	}
-#endif
 	if (!strcmp(var, "print-type"))
 		return parse_callchain_mode(value);
 	if (!strcmp(var, "order"))
tools/perf/util/callchain.h +0 -4
index 13e7554..47cfd10 100644
@@ -11,11 +11,7 @@
 
 #define CALLCHAIN_HELP "setup and enables call-graph (stack chain/backtrace):\n\n"
 
-#ifdef HAVE_DWARF_UNWIND_SUPPORT
 # define RECORD_MODE_HELP  HELP_PAD "record_mode:\tcall graph recording mode (fp|dwarf|lbr)\n"
-#else
-# define RECORD_MODE_HELP  HELP_PAD "record_mode:\tcall graph recording mode (fp|lbr)\n"
-#endif
 
 #define RECORD_SIZE_HELP						\
 	HELP_PAD "record_size:\tif record_mode is 'dwarf', max size of stack recording (<bytes>)\n" \