linux-perf-users.vger.kernel.org archive mirror
 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

* [PATCH 2/2] perf config: Show default report configuration in example and docs
  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 ` Milian Wolff
  2016-08-31 21:49   ` Arnaldo Carvalho de Melo
  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

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

Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
---
 tools/perf/Documentation/perf-config.txt    | 8 ++++++++
 tools/perf/Documentation/perfconfig.example | 9 +++++++++
 2 files changed, 17 insertions(+)

diff --git a/tools/perf/Documentation/perf-config.txt b/tools/perf/Documentation/perf-config.txt
index c7031bc..1559000 100644
--- a/tools/perf/Documentation/perf-config.txt
+++ b/tools/perf/Documentation/perf-config.txt
@@ -110,6 +110,14 @@ Given a $HOME/.perfconfig like this:
 		order = caller
 		sort-key = function
 
+	[report]
+		# Defaults
+		sort-order = comm,dso,symbol
+		percent-limit = 0
+		queue-size = 0
+		children = true
+		group = true
+
 Variables
 ~~~~~~~~~
 
diff --git a/tools/perf/Documentation/perfconfig.example b/tools/perf/Documentation/perfconfig.example
index 1d8d5bc..2b477c1 100644
--- a/tools/perf/Documentation/perfconfig.example
+++ b/tools/perf/Documentation/perfconfig.example
@@ -27,3 +27,12 @@
 	use_offset = true
 	jump_arrows = true
 	show_nr_jumps = false
+
+[report]
+
+	# Defaults
+	sort-order = comm,dso,symbol
+	percent-limit = 0
+	queue-size = 0
+	children = true
+	group = true
-- 
2.9.3

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

* Re: [PATCH 2/2] perf config: Show default report configuration in example and docs
  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
  0 siblings, 0 replies; 3+ messages in thread
From: Arnaldo Carvalho de Melo @ 2016-08-31 21:49 UTC (permalink / raw)
  To: Milian Wolff; +Cc: linux-perf-users

Em Tue, Aug 30, 2016 at 03:41:06PM +0200, Milian Wolff escreveu:
> Signed-off-by: Milian Wolff <milian.wolff@kdab.com>

Thanks, applied to perf/core.

- Arnaldo
 
> Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
> ---
>  tools/perf/Documentation/perf-config.txt    | 8 ++++++++
>  tools/perf/Documentation/perfconfig.example | 9 +++++++++
>  2 files changed, 17 insertions(+)
> 
> diff --git a/tools/perf/Documentation/perf-config.txt b/tools/perf/Documentation/perf-config.txt
> index c7031bc..1559000 100644
> --- a/tools/perf/Documentation/perf-config.txt
> +++ b/tools/perf/Documentation/perf-config.txt
> @@ -110,6 +110,14 @@ Given a $HOME/.perfconfig like this:
>  		order = caller
>  		sort-key = function
>  
> +	[report]
> +		# Defaults
> +		sort-order = comm,dso,symbol
> +		percent-limit = 0
> +		queue-size = 0
> +		children = true
> +		group = true
> +
>  Variables
>  ~~~~~~~~~
>  
> diff --git a/tools/perf/Documentation/perfconfig.example b/tools/perf/Documentation/perfconfig.example
> index 1d8d5bc..2b477c1 100644
> --- a/tools/perf/Documentation/perfconfig.example
> +++ b/tools/perf/Documentation/perfconfig.example
> @@ -27,3 +27,12 @@
>  	use_offset = true
>  	jump_arrows = true
>  	show_nr_jumps = false
> +
> +[report]
> +
> +	# Defaults
> +	sort-order = comm,dso,symbol
> +	percent-limit = 0
> +	queue-size = 0
> +	children = true
> +	group = true
> -- 
> 2.9.3

^ permalink raw reply	[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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).