All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] perf report: Accept report.sort-order as synonym to report.sort_order
@ 2016-08-30 13:41 Milian Wolff
  2016-08-30 13:41 ` [PATCH 2/2] perf config: Show default report configuration in example and docs Milian Wolff
  0 siblings, 1 reply; 3+ messages in thread
From: Milian Wolff @ 2016-08-30 13:41 UTC (permalink / raw)
  To: linux-perf-users; +Cc: Milian Wolff, Arnaldo Carvalho de Melo

The other config keys use dashes but report.sort_order used to only
allow an underline which is confusing. This patch allows the
dash syntax as a synonym to the underline syntax, making the
following .perfconfig file completely valid:

    [report]
    sort-order = dso,sym,srcline

    [call-graph]
    record-mode = dwarf
    print-type = graph
    sort-key = address

Signed-off-by: Milian Wolff <milian.wolff@kdab.com>

Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
---
 tools/perf/Documentation/perf-config.txt | 1 +
 tools/perf/builtin-report.c              | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/tools/perf/Documentation/perf-config.txt b/tools/perf/Documentation/perf-config.txt
index 68c8919..c7031bc 100644
--- a/tools/perf/Documentation/perf-config.txt
+++ b/tools/perf/Documentation/perf-config.txt
@@ -382,6 +382,7 @@ call-graph.*::
 		histogram entry. Default is 0 which means no limitation.
 
 report.*::
+	report.sort-order::
 	report.sort_order::
 		Allows changing the default sort order from "comm,dso,symbol" to
 		some other default, for instance "sym,dso" may be more fitting for
diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c
index b9e046b..3842b59 100644
--- a/tools/perf/builtin-report.c
+++ b/tools/perf/builtin-report.c
@@ -89,7 +89,7 @@ static int report__config(const char *var, const char *value, void *cb)
 		rep->queue_size = perf_config_u64(var, value);
 		return 0;
 	}
-	if (!strcmp(var, "report.sort_order")) {
+	if (!strcmp(var, "report.sort_order") || !strcmp(var, "report.sort-order")) {
 		default_sort_order = strdup(value);
 		return 0;
 	}
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-08-31 21:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-30 13:41 [PATCH 1/2] perf report: Accept report.sort-order as synonym to report.sort_order Milian Wolff
2016-08-30 13:41 ` [PATCH 2/2] perf config: Show default report configuration in example and docs Milian Wolff
2016-08-31 21:49   ` Arnaldo Carvalho de Melo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.