All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/9] perf tools: Assorted fixes
@ 2018-04-23  9:08 Jiri Olsa
  2018-04-23  9:08 ` [PATCH 1/9] perf check-headers.sh: Simplify arguments passing Jiri Olsa
                   ` (9 more replies)
  0 siblings, 10 replies; 29+ messages in thread
From: Jiri Olsa @ 2018-04-23  9:08 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: lkml, Ingo Molnar, Namhyung Kim, David Ahern, Alexander Shishkin,
	Peter Zijlstra

hi,
sending assorted general fixes that queued
up in my other branches.

Arnaldo,
I added wait4 call in the last patch and am wondering
if it will pass your all-distros-docker test ;-)
If not I'll need to put some build detection code.

Also available in here:
  https://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git
  perf/fixes

thanks,
jirka

---
Jiri Olsa (9):
      perf check-headers.sh: Simplify arguments passing
      perf check-headers.sh: Add support to check 2 independent files
      perf stat: Keep the / modifier separator in fallback
      perf tools: Fix pmu events parsing rule
      perf tools: Disable write_backward for leader sampling group events
      perf stat: Display time in precision based on std deviation
      perf stat: Add --table option to display time of each run
      perf stat: Display length strings of each run for --table option
      perf stat: Display user and system time

 tools/perf/builtin-stat.c                        | 120 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-----------
 tools/perf/check-headers.sh                      |  30 +++++++++++++++-------------
 tools/perf/tests/attr/test-record-group-sampling |   3 +++
 tools/perf/util/evsel.c                          |  15 +++++++++++---
 tools/perf/util/parse-events.y                   |   8 ++++----
 tools/perf/util/stat.h                           |   3 +--
 6 files changed, 146 insertions(+), 33 deletions(-)

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

* [PATCH 1/9] perf check-headers.sh: Simplify arguments passing
  2018-04-23  9:08 [PATCH 0/9] perf tools: Assorted fixes Jiri Olsa
@ 2018-04-23  9:08 ` Jiri Olsa
  2018-05-02 17:40   ` [tip:perf/core] " tip-bot for Jiri Olsa
  2018-04-23  9:08 ` [PATCH 2/9] perf check-headers.sh: Add support to check 2 independent files Jiri Olsa
                   ` (8 subsequent siblings)
  9 siblings, 1 reply; 29+ messages in thread
From: Jiri Olsa @ 2018-04-23  9:08 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: lkml, Ingo Molnar, Namhyung Kim, David Ahern, Alexander Shishkin,
	Peter Zijlstra

Passing whole string instead of parsing them after.
It simplifies things for the next patches, that adds
another function call, which makes it hard to pass
arguments in the correct shape.

Link: http://lkml.kernel.org/n/tip-7sxkyhuktvxiepem60d6451b@git.kernel.org
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
---
 tools/perf/check-headers.sh | 15 +++++----------
 1 file changed, 5 insertions(+), 10 deletions(-)

diff --git a/tools/perf/check-headers.sh b/tools/perf/check-headers.sh
index 9aff89bc7535..88c5f9449809 100755
--- a/tools/perf/check-headers.sh
+++ b/tools/perf/check-headers.sh
@@ -59,13 +59,8 @@ check () {
   file=$1
 
   shift
-  opts=
-  while [ -n "$*" ]; do
-    opts="$opts \"$1\""
-    shift
-  done
 
-  cmd="diff $opts ../$file ../../$file > /dev/null"
+  cmd="diff $* ../$file ../../$file > /dev/null"
 
   test -f ../../$file &&
   eval $cmd || echo "Warning: Kernel ABI header at 'tools/$file' differs from latest version at '$file'" >&2
@@ -83,7 +78,7 @@ for i in $HEADERS; do
 done
 
 # diff with extra ignore lines
-check arch/x86/lib/memcpy_64.S        -I "^EXPORT_SYMBOL" -I "^#include <asm/export.h>"
-check arch/x86/lib/memset_64.S        -I "^EXPORT_SYMBOL" -I "^#include <asm/export.h>"
-check include/uapi/asm-generic/mman.h -I "^#include <\(uapi/\)*asm-generic/mman-common.h>"
-check include/uapi/linux/mman.h       -I "^#include <\(uapi/\)*asm/mman.h>"
+check arch/x86/lib/memcpy_64.S        '-I "^EXPORT_SYMBOL" -I "^#include <asm/export.h>"'
+check arch/x86/lib/memset_64.S        '-I "^EXPORT_SYMBOL" -I "^#include <asm/export.h>"'
+check include/uapi/asm-generic/mman.h '-I "^#include <\(uapi/\)*asm-generic/mman-common.h>"'
+check include/uapi/linux/mman.h       '-I "^#include <\(uapi/\)*asm/mman.h>"'
-- 
2.13.6

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

* [PATCH 2/9] perf check-headers.sh: Add support to check 2 independent files
  2018-04-23  9:08 [PATCH 0/9] perf tools: Assorted fixes Jiri Olsa
  2018-04-23  9:08 ` [PATCH 1/9] perf check-headers.sh: Simplify arguments passing Jiri Olsa
@ 2018-04-23  9:08 ` Jiri Olsa
  2018-04-23 14:28   ` Arnaldo Carvalho de Melo
  2018-05-02 17:41   ` [tip:perf/core] " tip-bot for Jiri Olsa
  2018-04-23  9:08 ` [PATCH 3/9] perf stat: Keep the / modifier separator in fallback Jiri Olsa
                   ` (7 subsequent siblings)
  9 siblings, 2 replies; 29+ messages in thread
From: Jiri Olsa @ 2018-04-23  9:08 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: lkml, Ingo Molnar, Namhyung Kim, David Ahern, Alexander Shishkin,
	Peter Zijlstra

Adding check_2 function to check 2 different files,
the check function stays to check files that differs
only in the prefix path.

In upcoming changes we need to check on header files
in locations which don't follow the prefix logic.

Link: http://lkml.kernel.org/n/tip-p1o7jpx53236fgzgezdylu50@git.kernel.org
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
---
 tools/perf/check-headers.sh | 17 +++++++++++++----
 1 file changed, 13 insertions(+), 4 deletions(-)

diff --git a/tools/perf/check-headers.sh b/tools/perf/check-headers.sh
index 88c5f9449809..10f333e2e825 100755
--- a/tools/perf/check-headers.sh
+++ b/tools/perf/check-headers.sh
@@ -55,17 +55,26 @@ include/uapi/asm-generic/ioctls.h
 include/uapi/asm-generic/mman-common.h
 '
 
-check () {
-  file=$1
+check_2 () {
+  file1=$1
+  file2=$2
 
   shift
+  shift
 
-  cmd="diff $* ../$file ../../$file > /dev/null"
+  cmd="diff $* $file1 $file2 > /dev/null"
 
-  test -f ../../$file &&
+  test -f $file2 &&
   eval $cmd || echo "Warning: Kernel ABI header at 'tools/$file' differs from latest version at '$file'" >&2
 }
 
+check () {
+  file=$1
+
+  shift
+
+  check_2 ../$file ../../$file $*
+}
 
 # Check if we have the kernel headers (tools/perf/../../include), else
 # we're probably on a detached tarball, so no point in trying to check
-- 
2.13.6

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

* [PATCH 3/9] perf stat: Keep the / modifier separator in fallback
  2018-04-23  9:08 [PATCH 0/9] perf tools: Assorted fixes Jiri Olsa
  2018-04-23  9:08 ` [PATCH 1/9] perf check-headers.sh: Simplify arguments passing Jiri Olsa
  2018-04-23  9:08 ` [PATCH 2/9] perf check-headers.sh: Add support to check 2 independent files Jiri Olsa
@ 2018-04-23  9:08 ` Jiri Olsa
  2018-04-23 14:16   ` Arnaldo Carvalho de Melo
  2018-04-26  5:53   ` [tip:perf/urgent] " tip-bot for Jiri Olsa
  2018-04-23  9:08 ` [PATCH 4/9] perf tools: Fix pmu events parsing rule Jiri Olsa
                   ` (6 subsequent siblings)
  9 siblings, 2 replies; 29+ messages in thread
From: Jiri Olsa @ 2018-04-23  9:08 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: lkml, Ingo Molnar, Namhyung Kim, David Ahern, Alexander Shishkin,
	Peter Zijlstra

The perf stat fallback for EACCES error sets exclude_kernel
for event and repeats the open. In addition, it also changes
the name of the event to reflect that change by adding the
'u' modifier.

But it does not take into account the '/' separator, so the
event name can end up mangled, like:
(note the '/:' characters)

  $ perf stat -e cpu/cpu-cycles/ kill
  ...
             386,832      cpu/cpu-cycles/:u

Adding the code to check on the '/' separatos and set
following event name:

  $ perf stat -e cpu/cpu-cycles/ kill
  ...
             388,548      cpu/cpu-cycles/u

Link: http://lkml.kernel.org/n/tip-bh7wxrci19km6iwbv4qg555o@git.kernel.org
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
---
 tools/perf/util/evsel.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c
index 1ac8d9236efd..7472f876cd70 100644
--- a/tools/perf/util/evsel.c
+++ b/tools/perf/util/evsel.c
@@ -2754,8 +2754,14 @@ bool perf_evsel__fallback(struct perf_evsel *evsel, int err,
 		   (paranoid = perf_event_paranoid()) > 1) {
 		const char *name = perf_evsel__name(evsel);
 		char *new_name;
+		const char *sep = ":";
 
-		if (asprintf(&new_name, "%s%su", name, strchr(name, ':') ? "" : ":") < 0)
+		/* Is there already the separator in the name. */
+		if (strchr(name, '/') ||
+		    strchr(name, ':'))
+			sep = "";
+
+		if (asprintf(&new_name, "%s%su", name, sep) < 0)
 			return false;
 
 		if (evsel->name)
-- 
2.13.6

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

* [PATCH 4/9] perf tools: Fix pmu events parsing rule
  2018-04-23  9:08 [PATCH 0/9] perf tools: Assorted fixes Jiri Olsa
                   ` (2 preceding siblings ...)
  2018-04-23  9:08 ` [PATCH 3/9] perf stat: Keep the / modifier separator in fallback Jiri Olsa
@ 2018-04-23  9:08 ` Jiri Olsa
  2018-04-23 14:20   ` Arnaldo Carvalho de Melo
  2018-04-26  5:54   ` [tip:perf/urgent] perf pmu: " tip-bot for Jiri Olsa
  2018-04-23  9:08 ` [PATCH 5/9] perf tools: Disable write_backward for leader sampling group events Jiri Olsa
                   ` (5 subsequent siblings)
  9 siblings, 2 replies; 29+ messages in thread
From: Jiri Olsa @ 2018-04-23  9:08 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: lkml, Ingo Molnar, Namhyung Kim, David Ahern, Alexander Shishkin,
	Peter Zijlstra

Currently all the event parsing fails end up
in the event_pmu rule, and display misleading
help like:

  $ perf stat -e inst kill
  event syntax error: 'inst'
                       \___ Cannot find PMU `inst'. Missing kernel support?
  ...

The reason is that the event_pmu is too strong
and match also single string. Changing it to
force the '/' separators to be part of the rule,
and getting the proper error now:

  $ perf stat -e inst kill
  event syntax error: 'inst'
                       \___ parser error
  Run 'perf list' for a list of valid events
  ...

Link: http://lkml.kernel.org/n/tip-vgf5a8wk0eyayo7omvutwhqo@git.kernel.org
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
---
 tools/perf/util/parse-events.y | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/tools/perf/util/parse-events.y b/tools/perf/util/parse-events.y
index 7afeb80cc39e..d14464c42714 100644
--- a/tools/perf/util/parse-events.y
+++ b/tools/perf/util/parse-events.y
@@ -224,15 +224,15 @@ event_def: event_pmu |
 	   event_bpf_file
 
 event_pmu:
-PE_NAME opt_event_config
+PE_NAME '/' event_config '/'
 {
 	struct list_head *list, *orig_terms, *terms;
 
-	if (parse_events_copy_term_list($2, &orig_terms))
+	if (parse_events_copy_term_list($3, &orig_terms))
 		YYABORT;
 
 	ALLOC_LIST(list);
-	if (parse_events_add_pmu(_parse_state, list, $1, $2, false)) {
+	if (parse_events_add_pmu(_parse_state, list, $1, $3, false)) {
 		struct perf_pmu *pmu = NULL;
 		int ok = 0;
 		char *pattern;
@@ -262,7 +262,7 @@ PE_NAME opt_event_config
 		if (!ok)
 			YYABORT;
 	}
-	parse_events_terms__delete($2);
+	parse_events_terms__delete($3);
 	parse_events_terms__delete(orig_terms);
 	$$ = list;
 }
-- 
2.13.6

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

* [PATCH 5/9] perf tools: Disable write_backward for leader sampling group events
  2018-04-23  9:08 [PATCH 0/9] perf tools: Assorted fixes Jiri Olsa
                   ` (3 preceding siblings ...)
  2018-04-23  9:08 ` [PATCH 4/9] perf tools: Fix pmu events parsing rule Jiri Olsa
@ 2018-04-23  9:08 ` Jiri Olsa
  2018-04-23 14:23   ` Arnaldo Carvalho de Melo
  2018-04-26  5:54   ` [tip:perf/urgent] perf evsel: " tip-bot for Jiri Olsa
  2018-04-23  9:08 ` [PATCH 6/9] perf stat: Display time in precision based on std deviation Jiri Olsa
                   ` (4 subsequent siblings)
  9 siblings, 2 replies; 29+ messages in thread
From: Jiri Olsa @ 2018-04-23  9:08 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: Kan Liang, lkml, Ingo Molnar, Namhyung Kim, David Ahern,
	Alexander Shishkin, Peter Zijlstra

.. and other related fields that do not need to be enabled
for events that have sampling leader.

It fixes the perf top usage Ingo reported broken:

  # perf top -e '{cycles,msr/aperf/}:S'

The msr/aperf/ is configured for write_back sampling, which
is not allowed by msr pmu, so it fails to create the event.

Adjusting related attr test.

Reported-by: Ingo Molnar <mingo@kernel.org>
Cc: Kan Liang <kan.liang@intel.com>
Link: http://lkml.kernel.org/n/tip-bh7wxrci19km6iwbv4qg555o@git.kernel.org
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
---
 tools/perf/tests/attr/test-record-group-sampling | 3 +++
 tools/perf/util/evsel.c                          | 7 +++++--
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/tools/perf/tests/attr/test-record-group-sampling b/tools/perf/tests/attr/test-record-group-sampling
index f906b793196f..8a33ca4f9e1f 100644
--- a/tools/perf/tests/attr/test-record-group-sampling
+++ b/tools/perf/tests/attr/test-record-group-sampling
@@ -35,3 +35,6 @@ inherit=0
 # sampling disabled
 sample_freq=0
 sample_period=0
+freq=0
+write_backward=0
+sample_id_all=0
diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c
index 7472f876cd70..81b7f1cdc956 100644
--- a/tools/perf/util/evsel.c
+++ b/tools/perf/util/evsel.c
@@ -930,8 +930,11 @@ void perf_evsel__config(struct perf_evsel *evsel, struct record_opts *opts,
 	 * than leader in case leader 'leads' the sampling.
 	 */
 	if ((leader != evsel) && leader->sample_read) {
-		attr->sample_freq   = 0;
-		attr->sample_period = 0;
+		attr->freq           = 0;
+		attr->sample_freq    = 0;
+		attr->sample_period  = 0;
+		attr->write_backward = 0;
+		attr->sample_id_all  = 0;
 	}
 
 	if (opts->no_samples)
-- 
2.13.6

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

* [PATCH 6/9] perf stat: Display time in precision based on std deviation
  2018-04-23  9:08 [PATCH 0/9] perf tools: Assorted fixes Jiri Olsa
                   ` (4 preceding siblings ...)
  2018-04-23  9:08 ` [PATCH 5/9] perf tools: Disable write_backward for leader sampling group events Jiri Olsa
@ 2018-04-23  9:08 ` Jiri Olsa
  2018-04-23 14:40   ` Arnaldo Carvalho de Melo
  2018-05-02 17:41   ` [tip:perf/core] " tip-bot for Jiri Olsa
  2018-04-23  9:08 ` [PATCH 7/9] perf stat: Add --table option to display time of each run Jiri Olsa
                   ` (3 subsequent siblings)
  9 siblings, 2 replies; 29+ messages in thread
From: Jiri Olsa @ 2018-04-23  9:08 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: lkml, Ingo Molnar, Namhyung Kim, David Ahern, Alexander Shishkin,
	Peter Zijlstra

Ingo suggested to display elapsed time for multirun
workload (perf stat -e) with precision based on the
precision of the standard deviation.

In his own words:

  > It would be better if perf stat would display elapsed time with a precision
  > adjusted to stddev, it should display at most 2 more significant digits than
  > the stddev inaccuracy.
  >
  > I.e. in the above case 0.39% is 0.109, so we only have accuracy for 1 digit, and
  > so we should only display 3:
  >
  >        27.988 seconds time elapsed                                ( +-  0.39% )

Plus suggestion about the output, which is small enough and
connected with above change that I merged both changes together.

  > Small output style nit - I think it would be nice if with --repeat the stddev was
  > also displayed in absolute values, besides percentage:
  >
  >       27.988 +- 0.109 seconds time elapsed   ( +- 0.39% )

The output is now:

   Performance counter stats for './perf bench sched pipe' (5 runs):
   SNIP
           13.3667 +- 0.0256 seconds time elapsed  ( +-  0.19% )

Suggested-by: Ingo Molnar <mingo@kernel.org>
Link: http://lkml.kernel.org/n/tip-q10lhnqju8rdpiha542mvied@git.kernel.org
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
---
 tools/perf/builtin-stat.c | 30 ++++++++++++++++++++++++------
 1 file changed, 24 insertions(+), 6 deletions(-)

diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c
index 147a27e8c937..6b4f3d359cb3 100644
--- a/tools/perf/builtin-stat.c
+++ b/tools/perf/builtin-stat.c
@@ -1733,19 +1733,37 @@ static void print_header(int argc, const char **argv)
 	}
 }
 
+static int get_precision(double num)
+{
+	if (num > 1)
+		return 0;
+
+	return lround(ceil(-log10(num)));
+}
+
 static void print_footer(void)
 {
+	double avg = avg_stats(&walltime_nsecs_stats) / NSEC_PER_SEC;
 	FILE *output = stat_config.output;
 	int n;
 
 	if (!null_run)
 		fprintf(output, "\n");
-	fprintf(output, " %17.9f seconds time elapsed",
-			avg_stats(&walltime_nsecs_stats) / NSEC_PER_SEC);
-	if (run_count > 1) {
-		fprintf(output, "                                        ");
-		print_noise_pct(stddev_stats(&walltime_nsecs_stats),
-				avg_stats(&walltime_nsecs_stats));
+
+	if (run_count == 1) {
+		fprintf(output, " %17.9f seconds time elapsed", avg);
+	} else {
+		double sd = stddev_stats(&walltime_nsecs_stats) / NSEC_PER_SEC;
+		/*
+		 * Display at most 2 more significant
+		 * digits than the stddev inaccuracy.
+		 */
+		int precision = get_precision(sd) + 2;
+
+		fprintf(output, " %17.*f +- %.*f seconds time elapsed",
+			precision, avg, precision, sd);
+
+		print_noise_pct(sd, avg);
 	}
 	fprintf(output, "\n\n");
 
-- 
2.13.6

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

* [PATCH 7/9] perf stat: Add --table option to display time of each run
  2018-04-23  9:08 [PATCH 0/9] perf tools: Assorted fixes Jiri Olsa
                   ` (5 preceding siblings ...)
  2018-04-23  9:08 ` [PATCH 6/9] perf stat: Display time in precision based on std deviation Jiri Olsa
@ 2018-04-23  9:08 ` Jiri Olsa
  2018-04-23 14:41   ` Arnaldo Carvalho de Melo
  2018-05-02 17:42   ` [tip:perf/core] " tip-bot for Jiri Olsa
  2018-04-23  9:08 ` [PATCH 8/9] perf stat: Display length strings of each run for --table option Jiri Olsa
                   ` (2 subsequent siblings)
  9 siblings, 2 replies; 29+ messages in thread
From: Jiri Olsa @ 2018-04-23  9:08 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: lkml, Ingo Molnar, Namhyung Kim, David Ahern, Alexander Shishkin,
	Peter Zijlstra

Adding --table option to display time for each
run (-r option), like:

  $ perf stat --null -r 5 --table perf bench sched pipe

   Performance counter stats for './perf bench sched pipe' (5 runs):

             # Table of individual measurements:
             5.379 (-0.176)
             5.243 (-0.311)
             5.238 (-0.317)
             5.536 (-0.019)
             6.377 (+0.823)

             # Final result:
             5.555 +- 0.213 seconds time elapsed  ( +-  3.83% )

Suggested-by: Ingo Molnar <mingo@kernel.org>
Link: http://lkml.kernel.org/n/tip-tmd7cqla3pzc0a0bdf13qfdu@git.kernel.org
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
---
 tools/perf/builtin-stat.c | 56 +++++++++++++++++++++++++++++++++++++++++++----
 tools/perf/util/stat.h    |  3 +--
 2 files changed, 53 insertions(+), 6 deletions(-)

diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c
index 6b4f3d359cb3..345687b0eb10 100644
--- a/tools/perf/builtin-stat.c
+++ b/tools/perf/builtin-stat.c
@@ -164,6 +164,7 @@ static bool			forever				= false;
 static bool			metric_only			= false;
 static bool			force_metric_only		= false;
 static bool			no_merge			= false;
+static bool			walltime_run_table		= false;
 static struct timespec		ref_time;
 static struct cpu_map		*aggr_map;
 static aggr_get_id_t		aggr_get_id;
@@ -172,6 +173,7 @@ static bool			interval_count;
 static const char		*output_name;
 static int			output_fd;
 static int			print_free_counters_hint;
+static u64			*walltime_run;
 
 struct perf_stat {
 	bool			 record;
@@ -568,7 +570,7 @@ static struct perf_evsel *perf_evsel__reset_weak_group(struct perf_evsel *evsel)
 	return leader;
 }
 
-static int __run_perf_stat(int argc, const char **argv)
+static int __run_perf_stat(int argc, const char **argv, int run_idx)
 {
 	int interval = stat_config.interval;
 	int times = stat_config.times;
@@ -751,6 +753,9 @@ static int __run_perf_stat(int argc, const char **argv)
 
 	t1 = rdclock();
 
+	if (walltime_run_table)
+		walltime_run[run_idx] = t1 - t0;
+
 	update_stats(&walltime_nsecs_stats, t1 - t0);
 
 	/*
@@ -765,7 +770,7 @@ static int __run_perf_stat(int argc, const char **argv)
 	return WEXITSTATUS(status);
 }
 
-static int run_perf_stat(int argc, const char **argv)
+static int run_perf_stat(int argc, const char **argv, int run_idx)
 {
 	int ret;
 
@@ -778,7 +783,7 @@ static int run_perf_stat(int argc, const char **argv)
 	if (sync_run)
 		sync();
 
-	ret = __run_perf_stat(argc, argv);
+	ret = __run_perf_stat(argc, argv, run_idx);
 	if (ret)
 		return ret;
 
@@ -1741,6 +1746,27 @@ static int get_precision(double num)
 	return lround(ceil(-log10(num)));
 }
 
+static void print_table(FILE *output, int precision, double avg)
+{
+	char tmp[64];
+	int idx, indent = 0;
+
+	scnprintf(tmp, 64, " %17.*f", precision, avg);
+	while (tmp[indent] == ' ')
+		indent++;
+
+	fprintf(output, "%*s# Table of individual measurements:\n", indent, "");
+
+	for (idx = 0; idx < run_count; idx++) {
+		double run = (double) walltime_run[idx] / NSEC_PER_SEC;
+
+		fprintf(output, " %17.*f (%+.*f)\n",
+			precision, run, precision, run - avg);
+	}
+
+	fprintf(output, "\n%*s# Final result:\n", indent, "");
+}
+
 static void print_footer(void)
 {
 	double avg = avg_stats(&walltime_nsecs_stats) / NSEC_PER_SEC;
@@ -1760,6 +1786,9 @@ static void print_footer(void)
 		 */
 		int precision = get_precision(sd) + 2;
 
+		if (walltime_run_table)
+			print_table(output, precision, avg);
+
 		fprintf(output, " %17.*f +- %.*f seconds time elapsed",
 			precision, avg, precision, sd);
 
@@ -1934,6 +1963,8 @@ static const struct option stat_options[] = {
 		    "be more verbose (show counter open errors, etc)"),
 	OPT_INTEGER('r', "repeat", &run_count,
 		    "repeat command and print average + stddev (max: 100, forever: 0)"),
+	OPT_BOOLEAN(0, "table", &walltime_run_table,
+		    "display details about each run (only with -r option)"),
 	OPT_BOOLEAN('n', "null", &null_run,
 		    "null run - dont start any counters"),
 	OPT_INCR('d', "detailed", &detailed_run,
@@ -2825,6 +2856,13 @@ int cmd_stat(int argc, const char **argv)
 		goto out;
 	}
 
+	if (walltime_run_table && run_count <= 1) {
+		fprintf(stderr, "--table is only supported with -r\n");
+		parse_options_usage(stat_usage, stat_options, "r", 1);
+		parse_options_usage(NULL, stat_options, "table", 0);
+		goto out;
+	}
+
 	if (output_fd < 0) {
 		fprintf(stderr, "argument to --log-fd must be a > 0\n");
 		parse_options_usage(stat_usage, stat_options, "log-fd", 0);
@@ -2879,6 +2917,14 @@ int cmd_stat(int argc, const char **argv)
 		run_count = 1;
 	}
 
+	if (walltime_run_table) {
+		walltime_run = zalloc(run_count * sizeof(walltime_run[0]));
+		if (!walltime_run) {
+			pr_err("failed to setup -r option");
+			goto out;
+		}
+	}
+
 	if ((stat_config.aggr_mode == AGGR_THREAD) &&
 		!target__has_task(&target)) {
 		if (!target.system_wide || target.cpu_list) {
@@ -2994,7 +3040,7 @@ int cmd_stat(int argc, const char **argv)
 			fprintf(output, "[ perf stat: executing run #%d ... ]\n",
 				run_idx + 1);
 
-		status = run_perf_stat(argc, argv);
+		status = run_perf_stat(argc, argv, run_idx);
 		if (forever && status != -1) {
 			print_counters(NULL, argc, argv);
 			perf_stat__reset_stats();
@@ -3042,6 +3088,8 @@ int cmd_stat(int argc, const char **argv)
 	perf_stat__exit_aggr_mode();
 	perf_evlist__free_stats(evsel_list);
 out:
+	free(walltime_run);
+
 	if (smi_cost && smi_reset)
 		sysfs__write_int(FREEZE_ON_SMI_PATH, 0);
 
diff --git a/tools/perf/util/stat.h b/tools/perf/util/stat.h
index 8f56ba4fd258..36efb986f7fc 100644
--- a/tools/perf/util/stat.h
+++ b/tools/perf/util/stat.h
@@ -7,8 +7,7 @@
 #include "xyarray.h"
 #include "rblist.h"
 
-struct stats
-{
+struct stats {
 	double n, mean, M2;
 	u64 max, min;
 };
-- 
2.13.6

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

* [PATCH 8/9] perf stat: Display length strings of each run for --table option
  2018-04-23  9:08 [PATCH 0/9] perf tools: Assorted fixes Jiri Olsa
                   ` (6 preceding siblings ...)
  2018-04-23  9:08 ` [PATCH 7/9] perf stat: Add --table option to display time of each run Jiri Olsa
@ 2018-04-23  9:08 ` Jiri Olsa
  2018-05-02 17:42   ` [tip:perf/core] " tip-bot for Jiri Olsa
  2018-04-23  9:08 ` [PATCH 9/9] perf stat: Display user and system time Jiri Olsa
  2018-04-23 18:48 ` [PATCH 0/9] perf tools: Assorted fixes Arnaldo Carvalho de Melo
  9 siblings, 1 reply; 29+ messages in thread
From: Jiri Olsa @ 2018-04-23  9:08 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: lkml, Ingo Molnar, Namhyung Kim, David Ahern, Alexander Shishkin,
	Peter Zijlstra

Adding support to display visual aid 'length strings' to
easily spot the biggest difference in time table.

  $ perf stat -r 10 --table perf bench sched pipe
  ...

   Performance counter stats for './perf bench sched pipe' (5 runs):

             # Table of individual measurements:
             5.189 (-0.293) #
             5.189 (-0.294) #
             5.186 (-0.296) #
             5.663 (+0.181) ##
             6.186 (+0.703) ####

             # Final result:
             5.483 +- 0.198 seconds time elapsed  ( +-  3.62% )

Suggested-by: Ingo Molnar <mingo@kernel.org>
Link: http://lkml.kernel.org/n/tip-hb3t43jryqr4d911yu1ap918@git.kernel.org
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
---
 tools/perf/builtin-stat.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c
index 345687b0eb10..2137c7d11767 100644
--- a/tools/perf/builtin-stat.c
+++ b/tools/perf/builtin-stat.c
@@ -1759,9 +1759,15 @@ static void print_table(FILE *output, int precision, double avg)
 
 	for (idx = 0; idx < run_count; idx++) {
 		double run = (double) walltime_run[idx] / NSEC_PER_SEC;
+		int h, n = 1 + abs((int) (100.0 * (run - avg)/run) / 5);
 
-		fprintf(output, " %17.*f (%+.*f)\n",
+		fprintf(output, " %17.*f (%+.*f) ",
 			precision, run, precision, run - avg);
+
+		for (h = 0; h < n; h++)
+			fprintf(output, "#");
+
+		fprintf(output, "\n");
 	}
 
 	fprintf(output, "\n%*s# Final result:\n", indent, "");
-- 
2.13.6

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

* [PATCH 9/9] perf stat: Display user and system time
  2018-04-23  9:08 [PATCH 0/9] perf tools: Assorted fixes Jiri Olsa
                   ` (7 preceding siblings ...)
  2018-04-23  9:08 ` [PATCH 8/9] perf stat: Display length strings of each run for --table option Jiri Olsa
@ 2018-04-23  9:08 ` Jiri Olsa
  2018-04-23 14:51   ` Arnaldo Carvalho de Melo
  2018-04-23 18:48 ` [PATCH 0/9] perf tools: Assorted fixes Arnaldo Carvalho de Melo
  9 siblings, 1 reply; 29+ messages in thread
From: Jiri Olsa @ 2018-04-23  9:08 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: lkml, Ingo Molnar, Namhyung Kim, David Ahern, Alexander Shishkin,
	Peter Zijlstra

Adding the support to read rusage data once the
workload is finished and display the system/user
time values:

  $ perf stat --null ./perf bench sched pipe
  ...

   Performance counter stats for './perf bench sched pipe':

       5.342599256 seconds time elapsed

       2.544434000 seconds user
       4.549691000 seconds sys

It works only in non -r mode.

Suggested-by: Ingo Molnar <mingo@kernel.org>
Link: http://lkml.kernel.org/n/tip-t8k6d3gs8sz8zqnz3aslk5ro@git.kernel.org
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
---
 tools/perf/builtin-stat.c | 28 +++++++++++++++++++++++++++-
 1 file changed, 27 insertions(+), 1 deletion(-)

diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c
index 2137c7d11767..9c987617c8e7 100644
--- a/tools/perf/builtin-stat.c
+++ b/tools/perf/builtin-stat.c
@@ -80,6 +80,9 @@
 #include <sys/stat.h>
 #include <sys/wait.h>
 #include <unistd.h>
+#include <sys/time.h>
+#include <sys/resource.h>
+#include <sys/wait.h>
 
 #include "sane_ctype.h"
 
@@ -174,6 +177,8 @@ static const char		*output_name;
 static int			output_fd;
 static int			print_free_counters_hint;
 static u64			*walltime_run;
+static bool			ru_display			= false;
+static struct rusage		ru_data;
 
 struct perf_stat {
 	bool			 record;
@@ -725,7 +730,7 @@ static int __run_perf_stat(int argc, const char **argv, int run_idx)
 					break;
 			}
 		}
-		waitpid(child_pid, &status, 0);
+		wait4(child_pid, &status, 0, &ru_data);
 
 		if (workload_exec_errno) {
 			const char *emsg = str_error_r(workload_exec_errno, msg, sizeof(msg));
@@ -1773,6 +1778,11 @@ static void print_table(FILE *output, int precision, double avg)
 	fprintf(output, "\n%*s# Final result:\n", indent, "");
 }
 
+static double timeval2double(struct timeval *t)
+{
+	return t->tv_sec + (double) t->tv_usec/USEC_PER_SEC;
+}
+
 static void print_footer(void)
 {
 	double avg = avg_stats(&walltime_nsecs_stats) / NSEC_PER_SEC;
@@ -1784,6 +1794,15 @@ static void print_footer(void)
 
 	if (run_count == 1) {
 		fprintf(output, " %17.9f seconds time elapsed", avg);
+
+		if (ru_display) {
+			double utime = timeval2double(&ru_data.ru_utime);
+			double stime = timeval2double(&ru_data.ru_stime);
+
+			fprintf(output, "\n\n");
+			fprintf(output, " %17.9f seconds user\n", utime);
+			fprintf(output, " %17.9f seconds sys\n", stime);
+		}
 	} else {
 		double sd = stddev_stats(&walltime_nsecs_stats) / NSEC_PER_SEC;
 		/*
@@ -2869,6 +2888,13 @@ int cmd_stat(int argc, const char **argv)
 		goto out;
 	}
 
+	/*
+	 * Display user/system times only for single
+	 * run and when there's specified tracee.
+	 */
+	if ((run_count == 1) && target__none(&target))
+		ru_display = true;
+
 	if (output_fd < 0) {
 		fprintf(stderr, "argument to --log-fd must be a > 0\n");
 		parse_options_usage(stat_usage, stat_options, "log-fd", 0);
-- 
2.13.6

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

* Re: [PATCH 3/9] perf stat: Keep the / modifier separator in fallback
  2018-04-23  9:08 ` [PATCH 3/9] perf stat: Keep the / modifier separator in fallback Jiri Olsa
@ 2018-04-23 14:16   ` Arnaldo Carvalho de Melo
  2018-04-26  5:53   ` [tip:perf/urgent] " tip-bot for Jiri Olsa
  1 sibling, 0 replies; 29+ messages in thread
From: Arnaldo Carvalho de Melo @ 2018-04-23 14:16 UTC (permalink / raw)
  To: Jiri Olsa
  Cc: lkml, Ingo Molnar, Namhyung Kim, David Ahern, Alexander Shishkin,
	Peter Zijlstra

Em Mon, Apr 23, 2018 at 11:08:17AM +0200, Jiri Olsa escreveu:
> The perf stat fallback for EACCES error sets exclude_kernel
> for event and repeats the open. In addition, it also changes
> the name of the event to reflect that change by adding the
> 'u' modifier.
> 
> But it does not take into account the '/' separator, so the
> event name can end up mangled, like:
> (note the '/:' characters)
> 
>   $ perf stat -e cpu/cpu-cycles/ kill
>   ...
>              386,832      cpu/cpu-cycles/:u
> 
> Adding the code to check on the '/' separatos and set
> following event name:
> 
>   $ perf stat -e cpu/cpu-cycles/ kill
>   ...
>              388,548      cpu/cpu-cycles/u

Thanks, tested, reproduced and applied to perf/urgent

- Arnaldo

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

* Re: [PATCH 4/9] perf tools: Fix pmu events parsing rule
  2018-04-23  9:08 ` [PATCH 4/9] perf tools: Fix pmu events parsing rule Jiri Olsa
@ 2018-04-23 14:20   ` Arnaldo Carvalho de Melo
  2018-04-23 14:25     ` Jiri Olsa
  2018-04-26  5:54   ` [tip:perf/urgent] perf pmu: " tip-bot for Jiri Olsa
  1 sibling, 1 reply; 29+ messages in thread
From: Arnaldo Carvalho de Melo @ 2018-04-23 14:20 UTC (permalink / raw)
  To: Jiri Olsa
  Cc: lkml, Ingo Molnar, Namhyung Kim, David Ahern, Alexander Shishkin,
	Peter Zijlstra

Em Mon, Apr 23, 2018 at 11:08:18AM +0200, Jiri Olsa escreveu:
> Currently all the event parsing fails end up
> in the event_pmu rule, and display misleading
> help like:
> 
>   $ perf stat -e inst kill
>   event syntax error: 'inst'
>                        \___ Cannot find PMU `inst'. Missing kernel support?
>   ...
> 
> The reason is that the event_pmu is too strong
> and match also single string. Changing it to
> force the '/' separators to be part of the rule,
> and getting the proper error now:
> 
>   $ perf stat -e inst kill
>   event syntax error: 'inst'
>                        \___ parser error
>   Run 'perf list' for a list of valid events

I added a Reported-by: Ingo after checking that that was the case in tha
private conversation we had, but I think this has to be further
improved: do we have enough context at this point to change that into:

   $ perf stat -e inst kill
   event syntax error: 'inst'
                        \___ unknown event
   Run 'perf list' for a list of valid events

Instead of the generic "parser error"? That "list of valid events" helps
tho, but if we're going to say something at that \___ MSG part...

- Arnaldo

>   ...
> 
> Link: http://lkml.kernel.org/n/tip-vgf5a8wk0eyayo7omvutwhqo@git.kernel.org
> Signed-off-by: Jiri Olsa <jolsa@kernel.org>
> ---
>  tools/perf/util/parse-events.y | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/tools/perf/util/parse-events.y b/tools/perf/util/parse-events.y
> index 7afeb80cc39e..d14464c42714 100644
> --- a/tools/perf/util/parse-events.y
> +++ b/tools/perf/util/parse-events.y
> @@ -224,15 +224,15 @@ event_def: event_pmu |
>  	   event_bpf_file
>  
>  event_pmu:
> -PE_NAME opt_event_config
> +PE_NAME '/' event_config '/'
>  {
>  	struct list_head *list, *orig_terms, *terms;
>  
> -	if (parse_events_copy_term_list($2, &orig_terms))
> +	if (parse_events_copy_term_list($3, &orig_terms))
>  		YYABORT;
>  
>  	ALLOC_LIST(list);
> -	if (parse_events_add_pmu(_parse_state, list, $1, $2, false)) {
> +	if (parse_events_add_pmu(_parse_state, list, $1, $3, false)) {
>  		struct perf_pmu *pmu = NULL;
>  		int ok = 0;
>  		char *pattern;
> @@ -262,7 +262,7 @@ PE_NAME opt_event_config
>  		if (!ok)
>  			YYABORT;
>  	}
> -	parse_events_terms__delete($2);
> +	parse_events_terms__delete($3);
>  	parse_events_terms__delete(orig_terms);
>  	$$ = list;
>  }
> -- 
> 2.13.6

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

* Re: [PATCH 5/9] perf tools: Disable write_backward for leader sampling group events
  2018-04-23  9:08 ` [PATCH 5/9] perf tools: Disable write_backward for leader sampling group events Jiri Olsa
@ 2018-04-23 14:23   ` Arnaldo Carvalho de Melo
  2018-04-26  5:54   ` [tip:perf/urgent] perf evsel: " tip-bot for Jiri Olsa
  1 sibling, 0 replies; 29+ messages in thread
From: Arnaldo Carvalho de Melo @ 2018-04-23 14:23 UTC (permalink / raw)
  To: Jiri Olsa
  Cc: Kan Liang, lkml, Ingo Molnar, Namhyung Kim, David Ahern,
	Alexander Shishkin, Peter Zijlstra

Em Mon, Apr 23, 2018 at 11:08:19AM +0200, Jiri Olsa escreveu:
> .. and other related fields that do not need to be enabled
> for events that have sampling leader.
> 
> It fixes the perf top usage Ingo reported broken:
> 
>   # perf top -e '{cycles,msr/aperf/}:S'
> 
> The msr/aperf/ is configured for write_back sampling, which
> is not allowed by msr pmu, so it fails to create the event.
> 
> Adjusting related attr test.

Applied to perf/urgent.

- Arnaldo

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

* Re: [PATCH 4/9] perf tools: Fix pmu events parsing rule
  2018-04-23 14:20   ` Arnaldo Carvalho de Melo
@ 2018-04-23 14:25     ` Jiri Olsa
  0 siblings, 0 replies; 29+ messages in thread
From: Jiri Olsa @ 2018-04-23 14:25 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: Jiri Olsa, lkml, Ingo Molnar, Namhyung Kim, David Ahern,
	Alexander Shishkin, Peter Zijlstra

On Mon, Apr 23, 2018 at 11:20:57AM -0300, Arnaldo Carvalho de Melo wrote:
> Em Mon, Apr 23, 2018 at 11:08:18AM +0200, Jiri Olsa escreveu:
> > Currently all the event parsing fails end up
> > in the event_pmu rule, and display misleading
> > help like:
> > 
> >   $ perf stat -e inst kill
> >   event syntax error: 'inst'
> >                        \___ Cannot find PMU `inst'. Missing kernel support?
> >   ...
> > 
> > The reason is that the event_pmu is too strong
> > and match also single string. Changing it to
> > force the '/' separators to be part of the rule,
> > and getting the proper error now:
> > 
> >   $ perf stat -e inst kill
> >   event syntax error: 'inst'
> >                        \___ parser error
> >   Run 'perf list' for a list of valid events
> 
> I added a Reported-by: Ingo after checking that that was the case in tha
> private conversation we had, but I think this has to be further
> improved: do we have enough context at this point to change that into:
> 
>    $ perf stat -e inst kill
>    event syntax error: 'inst'
>                         \___ unknown event
>    Run 'perf list' for a list of valid events
> 
> Instead of the generic "parser error"? That "list of valid events" helps
> tho, but if we're going to say something at that \___ MSG part...

yep, the plan is to display whatever match the user input
out of the all known event names..  in this case 'inst'
would match 'instructions' and some other arch related events

but it's some more work and this fix stands by itself ;-)

jirka

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

* Re: [PATCH 2/9] perf check-headers.sh: Add support to check 2 independent files
  2018-04-23  9:08 ` [PATCH 2/9] perf check-headers.sh: Add support to check 2 independent files Jiri Olsa
@ 2018-04-23 14:28   ` Arnaldo Carvalho de Melo
  2018-05-02 17:41   ` [tip:perf/core] " tip-bot for Jiri Olsa
  1 sibling, 0 replies; 29+ messages in thread
From: Arnaldo Carvalho de Melo @ 2018-04-23 14:28 UTC (permalink / raw)
  To: Jiri Olsa
  Cc: lkml, Ingo Molnar, Namhyung Kim, David Ahern, Alexander Shishkin,
	Peter Zijlstra

Em Mon, Apr 23, 2018 at 11:08:16AM +0200, Jiri Olsa escreveu:
> Adding check_2 function to check 2 different files,
> the check function stays to check files that differs
> only in the prefix path.

Applied 1/9 and 2/9 to perf/core.

- Arnaldo

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

* Re: [PATCH 6/9] perf stat: Display time in precision based on std deviation
  2018-04-23  9:08 ` [PATCH 6/9] perf stat: Display time in precision based on std deviation Jiri Olsa
@ 2018-04-23 14:40   ` Arnaldo Carvalho de Melo
  2018-05-02 17:41   ` [tip:perf/core] " tip-bot for Jiri Olsa
  1 sibling, 0 replies; 29+ messages in thread
From: Arnaldo Carvalho de Melo @ 2018-04-23 14:40 UTC (permalink / raw)
  To: Jiri Olsa
  Cc: lkml, Ingo Molnar, Namhyung Kim, David Ahern, Alexander Shishkin,
	Peter Zijlstra

Em Mon, Apr 23, 2018 at 11:08:20AM +0200, Jiri Olsa escreveu:
> Ingo suggested to display elapsed time for multirun
> workload (perf stat -e) with precision based on the
> precision of the standard deviation.
> 
> In his own words:

Tested and applied to perf/core.

- Arnaldo

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

* Re: [PATCH 7/9] perf stat: Add --table option to display time of each run
  2018-04-23  9:08 ` [PATCH 7/9] perf stat: Add --table option to display time of each run Jiri Olsa
@ 2018-04-23 14:41   ` Arnaldo Carvalho de Melo
  2018-04-23 15:29     ` Jiri Olsa
  2018-05-02 17:42   ` [tip:perf/core] " tip-bot for Jiri Olsa
  1 sibling, 1 reply; 29+ messages in thread
From: Arnaldo Carvalho de Melo @ 2018-04-23 14:41 UTC (permalink / raw)
  To: Jiri Olsa
  Cc: lkml, Ingo Molnar, Namhyung Kim, David Ahern, Alexander Shishkin,
	Peter Zijlstra

Em Mon, Apr 23, 2018 at 11:08:21AM +0200, Jiri Olsa escreveu:
> Adding --table option to display time for each
> run (-r option), like:

You forgot to add this to 'perf stat's man page, I'm doing it this time,

- Arnaldo

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

* Re: [PATCH 9/9] perf stat: Display user and system time
  2018-04-23  9:08 ` [PATCH 9/9] perf stat: Display user and system time Jiri Olsa
@ 2018-04-23 14:51   ` Arnaldo Carvalho de Melo
  2018-04-23 15:30     ` Jiri Olsa
  0 siblings, 1 reply; 29+ messages in thread
From: Arnaldo Carvalho de Melo @ 2018-04-23 14:51 UTC (permalink / raw)
  To: Jiri Olsa
  Cc: lkml, Ingo Molnar, Namhyung Kim, David Ahern, Alexander Shishkin,
	Peter Zijlstra

Em Mon, Apr 23, 2018 at 11:08:23AM +0200, Jiri Olsa escreveu:
> Adding the support to read rusage data once the
> workload is finished and display the system/user
> time values:
> 
>   $ perf stat --null ./perf bench sched pipe
>   ...
> 
>    Performance counter stats for './perf bench sched pipe':
> 
>        5.342599256 seconds time elapsed
> 
>        2.544434000 seconds user
>        4.549691000 seconds sys

Please write a setence or two explaining the above three timings, do it
nicely so that we can add it to the man page and avoid people scratching
heads :-)

All the other patches were applied, some to perf/urgent (fixes) the
remaining ones, new features, added to perf/core, up to Ingo to decide
where to merge when I get to ask him to pull.

- Arnaldo
 
> It works only in non -r mode.
> 
> Suggested-by: Ingo Molnar <mingo@kernel.org>
> Link: http://lkml.kernel.org/n/tip-t8k6d3gs8sz8zqnz3aslk5ro@git.kernel.org
> Signed-off-by: Jiri Olsa <jolsa@kernel.org>
> ---
>  tools/perf/builtin-stat.c | 28 +++++++++++++++++++++++++++-
>  1 file changed, 27 insertions(+), 1 deletion(-)
> 
> diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c
> index 2137c7d11767..9c987617c8e7 100644
> --- a/tools/perf/builtin-stat.c
> +++ b/tools/perf/builtin-stat.c
> @@ -80,6 +80,9 @@
>  #include <sys/stat.h>
>  #include <sys/wait.h>
>  #include <unistd.h>
> +#include <sys/time.h>
> +#include <sys/resource.h>
> +#include <sys/wait.h>
>  
>  #include "sane_ctype.h"
>  
> @@ -174,6 +177,8 @@ static const char		*output_name;
>  static int			output_fd;
>  static int			print_free_counters_hint;
>  static u64			*walltime_run;
> +static bool			ru_display			= false;
> +static struct rusage		ru_data;
>  
>  struct perf_stat {
>  	bool			 record;
> @@ -725,7 +730,7 @@ static int __run_perf_stat(int argc, const char **argv, int run_idx)
>  					break;
>  			}
>  		}
> -		waitpid(child_pid, &status, 0);
> +		wait4(child_pid, &status, 0, &ru_data);
>  
>  		if (workload_exec_errno) {
>  			const char *emsg = str_error_r(workload_exec_errno, msg, sizeof(msg));
> @@ -1773,6 +1778,11 @@ static void print_table(FILE *output, int precision, double avg)
>  	fprintf(output, "\n%*s# Final result:\n", indent, "");
>  }
>  
> +static double timeval2double(struct timeval *t)
> +{
> +	return t->tv_sec + (double) t->tv_usec/USEC_PER_SEC;
> +}
> +
>  static void print_footer(void)
>  {
>  	double avg = avg_stats(&walltime_nsecs_stats) / NSEC_PER_SEC;
> @@ -1784,6 +1794,15 @@ static void print_footer(void)
>  
>  	if (run_count == 1) {
>  		fprintf(output, " %17.9f seconds time elapsed", avg);
> +
> +		if (ru_display) {
> +			double utime = timeval2double(&ru_data.ru_utime);
> +			double stime = timeval2double(&ru_data.ru_stime);
> +
> +			fprintf(output, "\n\n");
> +			fprintf(output, " %17.9f seconds user\n", utime);
> +			fprintf(output, " %17.9f seconds sys\n", stime);
> +		}
>  	} else {
>  		double sd = stddev_stats(&walltime_nsecs_stats) / NSEC_PER_SEC;
>  		/*
> @@ -2869,6 +2888,13 @@ int cmd_stat(int argc, const char **argv)
>  		goto out;
>  	}
>  
> +	/*
> +	 * Display user/system times only for single
> +	 * run and when there's specified tracee.
> +	 */
> +	if ((run_count == 1) && target__none(&target))
> +		ru_display = true;
> +
>  	if (output_fd < 0) {
>  		fprintf(stderr, "argument to --log-fd must be a > 0\n");
>  		parse_options_usage(stat_usage, stat_options, "log-fd", 0);
> -- 
> 2.13.6

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

* Re: [PATCH 7/9] perf stat: Add --table option to display time of each run
  2018-04-23 14:41   ` Arnaldo Carvalho de Melo
@ 2018-04-23 15:29     ` Jiri Olsa
  0 siblings, 0 replies; 29+ messages in thread
From: Jiri Olsa @ 2018-04-23 15:29 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: Jiri Olsa, lkml, Ingo Molnar, Namhyung Kim, David Ahern,
	Alexander Shishkin, Peter Zijlstra

On Mon, Apr 23, 2018 at 11:41:49AM -0300, Arnaldo Carvalho de Melo wrote:
> Em Mon, Apr 23, 2018 at 11:08:21AM +0200, Jiri Olsa escreveu:
> > Adding --table option to display time for each
> > run (-r option), like:
> 
> You forgot to add this to 'perf stat's man page, I'm doing it this time,

ugh, sry.. thanks ;-)

jirka

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

* Re: [PATCH 9/9] perf stat: Display user and system time
  2018-04-23 14:51   ` Arnaldo Carvalho de Melo
@ 2018-04-23 15:30     ` Jiri Olsa
  0 siblings, 0 replies; 29+ messages in thread
From: Jiri Olsa @ 2018-04-23 15:30 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: Jiri Olsa, lkml, Ingo Molnar, Namhyung Kim, David Ahern,
	Alexander Shishkin, Peter Zijlstra

On Mon, Apr 23, 2018 at 11:51:20AM -0300, Arnaldo Carvalho de Melo wrote:
> Em Mon, Apr 23, 2018 at 11:08:23AM +0200, Jiri Olsa escreveu:
> > Adding the support to read rusage data once the
> > workload is finished and display the system/user
> > time values:
> > 
> >   $ perf stat --null ./perf bench sched pipe
> >   ...
> > 
> >    Performance counter stats for './perf bench sched pipe':
> > 
> >        5.342599256 seconds time elapsed
> > 
> >        2.544434000 seconds user
> >        4.549691000 seconds sys
> 
> Please write a setence or two explaining the above three timings, do it
> nicely so that we can add it to the man page and avoid people scratching
> heads :-)

will do  ;-)

> 
> All the other patches were applied, some to perf/urgent (fixes) the
> remaining ones, new features, added to perf/core, up to Ingo to decide
> where to merge when I get to ask him to pull.

cool, thanks

jirka

> 
> - Arnaldo
>  
> > It works only in non -r mode.
> > 
> > Suggested-by: Ingo Molnar <mingo@kernel.org>
> > Link: http://lkml.kernel.org/n/tip-t8k6d3gs8sz8zqnz3aslk5ro@git.kernel.org
> > Signed-off-by: Jiri Olsa <jolsa@kernel.org>
> > ---
> >  tools/perf/builtin-stat.c | 28 +++++++++++++++++++++++++++-
> >  1 file changed, 27 insertions(+), 1 deletion(-)
> > 
> > diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c
> > index 2137c7d11767..9c987617c8e7 100644
> > --- a/tools/perf/builtin-stat.c
> > +++ b/tools/perf/builtin-stat.c
> > @@ -80,6 +80,9 @@
> >  #include <sys/stat.h>
> >  #include <sys/wait.h>
> >  #include <unistd.h>
> > +#include <sys/time.h>
> > +#include <sys/resource.h>
> > +#include <sys/wait.h>
> >  
> >  #include "sane_ctype.h"
> >  
> > @@ -174,6 +177,8 @@ static const char		*output_name;
> >  static int			output_fd;
> >  static int			print_free_counters_hint;
> >  static u64			*walltime_run;
> > +static bool			ru_display			= false;
> > +static struct rusage		ru_data;
> >  
> >  struct perf_stat {
> >  	bool			 record;
> > @@ -725,7 +730,7 @@ static int __run_perf_stat(int argc, const char **argv, int run_idx)
> >  					break;
> >  			}
> >  		}
> > -		waitpid(child_pid, &status, 0);
> > +		wait4(child_pid, &status, 0, &ru_data);
> >  
> >  		if (workload_exec_errno) {
> >  			const char *emsg = str_error_r(workload_exec_errno, msg, sizeof(msg));
> > @@ -1773,6 +1778,11 @@ static void print_table(FILE *output, int precision, double avg)
> >  	fprintf(output, "\n%*s# Final result:\n", indent, "");
> >  }
> >  
> > +static double timeval2double(struct timeval *t)
> > +{
> > +	return t->tv_sec + (double) t->tv_usec/USEC_PER_SEC;
> > +}
> > +
> >  static void print_footer(void)
> >  {
> >  	double avg = avg_stats(&walltime_nsecs_stats) / NSEC_PER_SEC;
> > @@ -1784,6 +1794,15 @@ static void print_footer(void)
> >  
> >  	if (run_count == 1) {
> >  		fprintf(output, " %17.9f seconds time elapsed", avg);
> > +
> > +		if (ru_display) {
> > +			double utime = timeval2double(&ru_data.ru_utime);
> > +			double stime = timeval2double(&ru_data.ru_stime);
> > +
> > +			fprintf(output, "\n\n");
> > +			fprintf(output, " %17.9f seconds user\n", utime);
> > +			fprintf(output, " %17.9f seconds sys\n", stime);
> > +		}
> >  	} else {
> >  		double sd = stddev_stats(&walltime_nsecs_stats) / NSEC_PER_SEC;
> >  		/*
> > @@ -2869,6 +2888,13 @@ int cmd_stat(int argc, const char **argv)
> >  		goto out;
> >  	}
> >  
> > +	/*
> > +	 * Display user/system times only for single
> > +	 * run and when there's specified tracee.
> > +	 */
> > +	if ((run_count == 1) && target__none(&target))
> > +		ru_display = true;
> > +
> >  	if (output_fd < 0) {
> >  		fprintf(stderr, "argument to --log-fd must be a > 0\n");
> >  		parse_options_usage(stat_usage, stat_options, "log-fd", 0);
> > -- 
> > 2.13.6

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

* Re: [PATCH 0/9] perf tools: Assorted fixes
  2018-04-23  9:08 [PATCH 0/9] perf tools: Assorted fixes Jiri Olsa
                   ` (8 preceding siblings ...)
  2018-04-23  9:08 ` [PATCH 9/9] perf stat: Display user and system time Jiri Olsa
@ 2018-04-23 18:48 ` Arnaldo Carvalho de Melo
  9 siblings, 0 replies; 29+ messages in thread
From: Arnaldo Carvalho de Melo @ 2018-04-23 18:48 UTC (permalink / raw)
  To: Jiri Olsa
  Cc: lkml, Ingo Molnar, Namhyung Kim, David Ahern, Alexander Shishkin,
	Peter Zijlstra

Em Mon, Apr 23, 2018 at 11:08:14AM +0200, Jiri Olsa escreveu:
> hi,
> sending assorted general fixes that queued
> up in my other branches.
> 
> Arnaldo,
> I added wait4 call in the last patch and am wondering
> if it will pass your all-distros-docker test ;-)
> If not I'll need to put some build detection code.

That wasn't a problem, but centos:5, centos:6 didn't like this:

  CC       /tmp/build/perf/util/evsel.o
cc1: warnings being treated as errors
builtin-stat.c: In function 'print_footer':
builtin-stat.c:1800: warning: declaration of 'stime' shadows a global declaration
/usr/include/time.h:297: warning: shadowed declaration is here
mv: cannot stat `/tmp/build/perf/.builtin-stat.o.tmp': No such file or directory
make[3]: *** [/tmp/build/perf/builtin-stat.o] Error 1
make[3]: *** Waiting for unfinished jobs....

debian:7 didn't like something else, unrelated to your patches:

  CC       /tmp/build/perf/util/ctype.o
builtin-buildid-cache.c: In function 'cmd_buildid_cache':
builtin-buildid-cache.c:267:2: error: 'err' may be used uninitialized in this function [-Werror=uninitialized]
builtin-buildid-cache.c:247:6: note: 'err' was declared here
  MKDIR    /tmp/build/perf/util/

I'm hunting down the patch that introduced this last one...

- Arnaldo

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

* [tip:perf/urgent] perf stat: Keep the / modifier separator in fallback
  2018-04-23  9:08 ` [PATCH 3/9] perf stat: Keep the / modifier separator in fallback Jiri Olsa
  2018-04-23 14:16   ` Arnaldo Carvalho de Melo
@ 2018-04-26  5:53   ` tip-bot for Jiri Olsa
  1 sibling, 0 replies; 29+ messages in thread
From: tip-bot for Jiri Olsa @ 2018-04-26  5:53 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: acme, alexander.shishkin, dsahern, tglx, linux-kernel, mingo,
	hpa, jolsa, namhyung, peterz

Commit-ID:  129193bb0c43d42f1c397c175346e3e0dba5a578
Gitweb:     https://git.kernel.org/tip/129193bb0c43d42f1c397c175346e3e0dba5a578
Author:     Jiri Olsa <jolsa@kernel.org>
AuthorDate: Mon, 23 Apr 2018 11:08:17 +0200
Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Mon, 23 Apr 2018 11:14:10 -0300

perf stat: Keep the / modifier separator in fallback

The 'perf stat' fallback for EACCES error sets the exclude_kernel
perf_event_attr and tries perf_event_open() again with it. In addition,
it also changes the name of the event to reflect that change by adding
the 'u' modifier.

But it does not take into account the '/' separator, so the event name
can end up mangled, like: (note the '/:' characters)

  $ perf stat -e cpu/cpu-cycles/ kill
  ...
             386,832      cpu/cpu-cycles/:u

Adding the code to check on the '/' separator and set the following
correct event name:

  $ perf stat -e cpu/cpu-cycles/ kill
  ...
             388,548      cpu/cpu-cycles/u

Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20180423090823.32309-4-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/evsel.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c
index 3e87486c28fe..7eb1e9850abf 100644
--- a/tools/perf/util/evsel.c
+++ b/tools/perf/util/evsel.c
@@ -2754,8 +2754,14 @@ bool perf_evsel__fallback(struct perf_evsel *evsel, int err,
 		   (paranoid = perf_event_paranoid()) > 1) {
 		const char *name = perf_evsel__name(evsel);
 		char *new_name;
+		const char *sep = ":";
 
-		if (asprintf(&new_name, "%s%su", name, strchr(name, ':') ? "" : ":") < 0)
+		/* Is there already the separator in the name. */
+		if (strchr(name, '/') ||
+		    strchr(name, ':'))
+			sep = "";
+
+		if (asprintf(&new_name, "%s%su", name, sep) < 0)
 			return false;
 
 		if (evsel->name)

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

* [tip:perf/urgent] perf pmu: Fix pmu events parsing rule
  2018-04-23  9:08 ` [PATCH 4/9] perf tools: Fix pmu events parsing rule Jiri Olsa
  2018-04-23 14:20   ` Arnaldo Carvalho de Melo
@ 2018-04-26  5:54   ` tip-bot for Jiri Olsa
  1 sibling, 0 replies; 29+ messages in thread
From: tip-bot for Jiri Olsa @ 2018-04-26  5:54 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: alexander.shishkin, linux-kernel, hpa, peterz, namhyung, acme,
	mingo, jolsa, tglx, dsahern

Commit-ID:  9a4a931ce847f4aaa12edf11b2e050e18bf45910
Gitweb:     https://git.kernel.org/tip/9a4a931ce847f4aaa12edf11b2e050e18bf45910
Author:     Jiri Olsa <jolsa@kernel.org>
AuthorDate: Mon, 23 Apr 2018 11:08:18 +0200
Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Mon, 23 Apr 2018 11:17:27 -0300

perf pmu: Fix pmu events parsing rule

Currently all the event parsing fails end up in the event_pmu rule, and
display misleading help like:

  $ perf stat -e inst kill
  event syntax error: 'inst'
                       \___ Cannot find PMU `inst'. Missing kernel support?
  ...

The reason is that the event_pmu is too strong and match also single
string. Changing it to force the '/' separators to be part of the rule,
and getting the proper error now:

  $ perf stat -e inst kill
  event syntax error: 'inst'
                       \___ parser error
  Run 'perf list' for a list of valid events
  ...

Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Reported-by: Ingo Molnar <mingo@kernel.org>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20180423090823.32309-5-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/parse-events.y | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/tools/perf/util/parse-events.y b/tools/perf/util/parse-events.y
index 7afeb80cc39e..d14464c42714 100644
--- a/tools/perf/util/parse-events.y
+++ b/tools/perf/util/parse-events.y
@@ -224,15 +224,15 @@ event_def: event_pmu |
 	   event_bpf_file
 
 event_pmu:
-PE_NAME opt_event_config
+PE_NAME '/' event_config '/'
 {
 	struct list_head *list, *orig_terms, *terms;
 
-	if (parse_events_copy_term_list($2, &orig_terms))
+	if (parse_events_copy_term_list($3, &orig_terms))
 		YYABORT;
 
 	ALLOC_LIST(list);
-	if (parse_events_add_pmu(_parse_state, list, $1, $2, false)) {
+	if (parse_events_add_pmu(_parse_state, list, $1, $3, false)) {
 		struct perf_pmu *pmu = NULL;
 		int ok = 0;
 		char *pattern;
@@ -262,7 +262,7 @@ PE_NAME opt_event_config
 		if (!ok)
 			YYABORT;
 	}
-	parse_events_terms__delete($2);
+	parse_events_terms__delete($3);
 	parse_events_terms__delete(orig_terms);
 	$$ = list;
 }

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

* [tip:perf/urgent] perf evsel: Disable write_backward for leader sampling group events
  2018-04-23  9:08 ` [PATCH 5/9] perf tools: Disable write_backward for leader sampling group events Jiri Olsa
  2018-04-23 14:23   ` Arnaldo Carvalho de Melo
@ 2018-04-26  5:54   ` tip-bot for Jiri Olsa
  1 sibling, 0 replies; 29+ messages in thread
From: tip-bot for Jiri Olsa @ 2018-04-26  5:54 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: peterz, kan.liang, dsahern, tglx, linux-kernel,
	alexander.shishkin, jolsa, hpa, namhyung, mingo, acme

Commit-ID:  e9add8bac6c69edb4bf391e537faa659b2ed70d2
Gitweb:     https://git.kernel.org/tip/e9add8bac6c69edb4bf391e537faa659b2ed70d2
Author:     Jiri Olsa <jolsa@kernel.org>
AuthorDate: Mon, 23 Apr 2018 11:08:19 +0200
Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Mon, 23 Apr 2018 11:21:56 -0300

perf evsel: Disable write_backward for leader sampling group events

.. and other related fields that do not need to be enabled
for events that have sampling leader.

It fixes the perf top usage Ingo reported broken:

  # perf top -e '{cycles,msr/aperf/}:S'

The 'msr/aperf/' event is configured for write_back sampling, which is
not allowed by the MSR PMU, so it fails to create the event.

Adjusting related attr test.

Reported-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Kan Liang <kan.liang@linux.intel.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20180423090823.32309-6-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/tests/attr/test-record-group-sampling | 3 +++
 tools/perf/util/evsel.c                          | 7 +++++--
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/tools/perf/tests/attr/test-record-group-sampling b/tools/perf/tests/attr/test-record-group-sampling
index f906b793196f..8a33ca4f9e1f 100644
--- a/tools/perf/tests/attr/test-record-group-sampling
+++ b/tools/perf/tests/attr/test-record-group-sampling
@@ -35,3 +35,6 @@ inherit=0
 # sampling disabled
 sample_freq=0
 sample_period=0
+freq=0
+write_backward=0
+sample_id_all=0
diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c
index 7eb1e9850abf..26bdeecc0452 100644
--- a/tools/perf/util/evsel.c
+++ b/tools/perf/util/evsel.c
@@ -930,8 +930,11 @@ void perf_evsel__config(struct perf_evsel *evsel, struct record_opts *opts,
 	 * than leader in case leader 'leads' the sampling.
 	 */
 	if ((leader != evsel) && leader->sample_read) {
-		attr->sample_freq   = 0;
-		attr->sample_period = 0;
+		attr->freq           = 0;
+		attr->sample_freq    = 0;
+		attr->sample_period  = 0;
+		attr->write_backward = 0;
+		attr->sample_id_all  = 0;
 	}
 
 	if (opts->no_samples)

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

* [tip:perf/core] perf check-headers.sh: Simplify arguments passing
  2018-04-23  9:08 ` [PATCH 1/9] perf check-headers.sh: Simplify arguments passing Jiri Olsa
@ 2018-05-02 17:40   ` tip-bot for Jiri Olsa
  0 siblings, 0 replies; 29+ messages in thread
From: tip-bot for Jiri Olsa @ 2018-05-02 17:40 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: namhyung, jolsa, hpa, mingo, dsahern, linux-kernel, peterz,
	alexander.shishkin, acme, tglx

Commit-ID:  15019e9815a06b84870bfaf9ee1e8b75bf7ef6a6
Gitweb:     https://git.kernel.org/tip/15019e9815a06b84870bfaf9ee1e8b75bf7ef6a6
Author:     Jiri Olsa <jolsa@kernel.org>
AuthorDate: Mon, 23 Apr 2018 11:08:15 +0200
Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Thu, 26 Apr 2018 09:30:26 -0300

perf check-headers.sh: Simplify arguments passing

Passing whole string instead of parsing them after.  It simplifies
things for the next patches, that adds another function call, which
makes it hard to pass arguments in the correct shape.

Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20180423090823.32309-2-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/check-headers.sh | 15 +++++----------
 1 file changed, 5 insertions(+), 10 deletions(-)

diff --git a/tools/perf/check-headers.sh b/tools/perf/check-headers.sh
index 9aff89bc7535..88c5f9449809 100755
--- a/tools/perf/check-headers.sh
+++ b/tools/perf/check-headers.sh
@@ -59,13 +59,8 @@ check () {
   file=$1
 
   shift
-  opts=
-  while [ -n "$*" ]; do
-    opts="$opts \"$1\""
-    shift
-  done
 
-  cmd="diff $opts ../$file ../../$file > /dev/null"
+  cmd="diff $* ../$file ../../$file > /dev/null"
 
   test -f ../../$file &&
   eval $cmd || echo "Warning: Kernel ABI header at 'tools/$file' differs from latest version at '$file'" >&2
@@ -83,7 +78,7 @@ for i in $HEADERS; do
 done
 
 # diff with extra ignore lines
-check arch/x86/lib/memcpy_64.S        -I "^EXPORT_SYMBOL" -I "^#include <asm/export.h>"
-check arch/x86/lib/memset_64.S        -I "^EXPORT_SYMBOL" -I "^#include <asm/export.h>"
-check include/uapi/asm-generic/mman.h -I "^#include <\(uapi/\)*asm-generic/mman-common.h>"
-check include/uapi/linux/mman.h       -I "^#include <\(uapi/\)*asm/mman.h>"
+check arch/x86/lib/memcpy_64.S        '-I "^EXPORT_SYMBOL" -I "^#include <asm/export.h>"'
+check arch/x86/lib/memset_64.S        '-I "^EXPORT_SYMBOL" -I "^#include <asm/export.h>"'
+check include/uapi/asm-generic/mman.h '-I "^#include <\(uapi/\)*asm-generic/mman-common.h>"'
+check include/uapi/linux/mman.h       '-I "^#include <\(uapi/\)*asm/mman.h>"'

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

* [tip:perf/core] perf check-headers.sh: Add support to check 2 independent files
  2018-04-23  9:08 ` [PATCH 2/9] perf check-headers.sh: Add support to check 2 independent files Jiri Olsa
  2018-04-23 14:28   ` Arnaldo Carvalho de Melo
@ 2018-05-02 17:41   ` tip-bot for Jiri Olsa
  1 sibling, 0 replies; 29+ messages in thread
From: tip-bot for Jiri Olsa @ 2018-05-02 17:41 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: linux-kernel, mingo, jolsa, acme, peterz, namhyung, dsahern,
	tglx, alexander.shishkin, hpa

Commit-ID:  58247297359326603d601451223e0da6a97bee3c
Gitweb:     https://git.kernel.org/tip/58247297359326603d601451223e0da6a97bee3c
Author:     Jiri Olsa <jolsa@kernel.org>
AuthorDate: Mon, 23 Apr 2018 11:08:16 +0200
Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Thu, 26 Apr 2018 09:30:26 -0300

perf check-headers.sh: Add support to check 2 independent files

Add 'check_2' function to check 2 different files, the 'check' function
stays to check files that differs only in the prefix path.

In upcoming changes we need to check header files in locations which
don't follow the prefix logic.

Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20180423090823.32309-3-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/check-headers.sh | 17 +++++++++++++----
 1 file changed, 13 insertions(+), 4 deletions(-)

diff --git a/tools/perf/check-headers.sh b/tools/perf/check-headers.sh
index 88c5f9449809..10f333e2e825 100755
--- a/tools/perf/check-headers.sh
+++ b/tools/perf/check-headers.sh
@@ -55,17 +55,26 @@ include/uapi/asm-generic/ioctls.h
 include/uapi/asm-generic/mman-common.h
 '
 
-check () {
-  file=$1
+check_2 () {
+  file1=$1
+  file2=$2
 
+  shift
   shift
 
-  cmd="diff $* ../$file ../../$file > /dev/null"
+  cmd="diff $* $file1 $file2 > /dev/null"
 
-  test -f ../../$file &&
+  test -f $file2 &&
   eval $cmd || echo "Warning: Kernel ABI header at 'tools/$file' differs from latest version at '$file'" >&2
 }
 
+check () {
+  file=$1
+
+  shift
+
+  check_2 ../$file ../../$file $*
+}
 
 # Check if we have the kernel headers (tools/perf/../../include), else
 # we're probably on a detached tarball, so no point in trying to check

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

* [tip:perf/core] perf stat: Display time in precision based on std deviation
  2018-04-23  9:08 ` [PATCH 6/9] perf stat: Display time in precision based on std deviation Jiri Olsa
  2018-04-23 14:40   ` Arnaldo Carvalho de Melo
@ 2018-05-02 17:41   ` tip-bot for Jiri Olsa
  1 sibling, 0 replies; 29+ messages in thread
From: tip-bot for Jiri Olsa @ 2018-05-02 17:41 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: tglx, acme, linux-kernel, namhyung, peterz, dsahern, mingo,
	alexander.shishkin, ak, hpa, jolsa

Commit-ID:  bc22de9bcdb2249150fb5b3c48fdc4f6bedd3ad7
Gitweb:     https://git.kernel.org/tip/bc22de9bcdb2249150fb5b3c48fdc4f6bedd3ad7
Author:     Jiri Olsa <jolsa@kernel.org>
AuthorDate: Mon, 23 Apr 2018 11:08:20 +0200
Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Thu, 26 Apr 2018 09:30:27 -0300

perf stat: Display time in precision based on std deviation

Ingo suggested to display elapsed time for multirun workload (perf stat
-e) with precision based on the precision of the standard deviation.

In his own words:

  > This output is a slightly bit misleading:

  >  Performance counter stats for 'make -j128' (10 runs):
  >      27.988995256 seconds time elapsed                  ( +-  0.39% )

  > The 9 significant digits in the result, while only 1 is valid, suggests accuracy
  > where none exists.

  > It would be better if 'perf stat' would display elapsed time with a precision
  > adjusted to stddev, it should display at most 2 more significant digits than
  > the stddev inaccuracy.

  > I.e. in the above case 0.39% is 0.109, so we only have accuracy for 1 digit, and
  > so we should only display 3:

  >        27.988 seconds time elapsed                       ( +-  0.39% )

Plus a suggestion about the output, which is small enough and connected
with the above change that I merged both changes together.

  > Small output style nit - I think it would be nice if with --repeat the stddev was
  > also displayed in absolute values, besides percentage:
  >
  >       27.988 +- 0.109 seconds time elapsed   ( +- 0.39% )

The output is now:

   Performance counter stats for './perf bench sched pipe' (5 runs):
   SNIP
           13.3667 +- 0.0256 seconds time elapsed  ( +-  0.19% )

Suggested-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20180423090823.32309-7-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/builtin-stat.c | 30 ++++++++++++++++++++++++------
 1 file changed, 24 insertions(+), 6 deletions(-)

diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c
index f17dc601b0f3..3a94647ef6bc 100644
--- a/tools/perf/builtin-stat.c
+++ b/tools/perf/builtin-stat.c
@@ -1764,19 +1764,37 @@ static void print_header(int argc, const char **argv)
 	}
 }
 
+static int get_precision(double num)
+{
+	if (num > 1)
+		return 0;
+
+	return lround(ceil(-log10(num)));
+}
+
 static void print_footer(void)
 {
+	double avg = avg_stats(&walltime_nsecs_stats) / NSEC_PER_SEC;
 	FILE *output = stat_config.output;
 	int n;
 
 	if (!null_run)
 		fprintf(output, "\n");
-	fprintf(output, " %17.9f seconds time elapsed",
-			avg_stats(&walltime_nsecs_stats) / NSEC_PER_SEC);
-	if (run_count > 1) {
-		fprintf(output, "                                        ");
-		print_noise_pct(stddev_stats(&walltime_nsecs_stats),
-				avg_stats(&walltime_nsecs_stats));
+
+	if (run_count == 1) {
+		fprintf(output, " %17.9f seconds time elapsed", avg);
+	} else {
+		double sd = stddev_stats(&walltime_nsecs_stats) / NSEC_PER_SEC;
+		/*
+		 * Display at most 2 more significant
+		 * digits than the stddev inaccuracy.
+		 */
+		int precision = get_precision(sd) + 2;
+
+		fprintf(output, " %17.*f +- %.*f seconds time elapsed",
+			precision, avg, precision, sd);
+
+		print_noise_pct(sd, avg);
 	}
 	fprintf(output, "\n\n");
 

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

* [tip:perf/core] perf stat: Add --table option to display time of each run
  2018-04-23  9:08 ` [PATCH 7/9] perf stat: Add --table option to display time of each run Jiri Olsa
  2018-04-23 14:41   ` Arnaldo Carvalho de Melo
@ 2018-05-02 17:42   ` tip-bot for Jiri Olsa
  1 sibling, 0 replies; 29+ messages in thread
From: tip-bot for Jiri Olsa @ 2018-05-02 17:42 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: acme, alexander.shishkin, namhyung, tglx, hpa, dsahern, jolsa,
	mingo, linux-kernel, peterz

Commit-ID:  e55c14af488a728d314777f038bd05db18afc1e9
Gitweb:     https://git.kernel.org/tip/e55c14af488a728d314777f038bd05db18afc1e9
Author:     Jiri Olsa <jolsa@kernel.org>
AuthorDate: Mon, 23 Apr 2018 11:08:21 +0200
Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Thu, 26 Apr 2018 09:30:27 -0300

perf stat: Add --table option to display time of each run

Add --table option to display time for each run (-r option), like:

  $ perf stat --null -r 5 --table perf bench sched pipe

   Performance counter stats for './perf bench sched pipe' (5 runs):

             # Table of individual measurements:
             5.379 (-0.176)
             5.243 (-0.311)
             5.238 (-0.317)
             5.536 (-0.019)
             6.377 (+0.823)

             # Final result:
             5.555 +- 0.213 seconds time elapsed  ( +-  3.83% )

Suggested-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20180423090823.32309-8-jolsa@kernel.org
[ Document the new option in 'perf stat's man page ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/Documentation/perf-stat.txt | 16 ++++++++++
 tools/perf/builtin-stat.c              | 56 +++++++++++++++++++++++++++++++---
 tools/perf/util/stat.h                 |  3 +-
 3 files changed, 69 insertions(+), 6 deletions(-)

diff --git a/tools/perf/Documentation/perf-stat.txt b/tools/perf/Documentation/perf-stat.txt
index e6c3b4e555c2..72a2414513bd 100644
--- a/tools/perf/Documentation/perf-stat.txt
+++ b/tools/perf/Documentation/perf-stat.txt
@@ -116,6 +116,22 @@ Do not aggregate counts across all monitored CPUs.
 print counts using a CSV-style output to make it easy to import directly into
 spreadsheets. Columns are separated by the string specified in SEP.
 
+--table:: Display time for each run (-r option), in a table format, e.g.:
+
+  $ perf stat --null -r 5 --table perf bench sched pipe
+
+   Performance counter stats for 'perf bench sched pipe' (5 runs):
+
+             # Table of individual measurements:
+             5.379 (-0.176)
+             5.243 (-0.311)
+             5.238 (-0.317)
+             5.536 (-0.019)
+             6.377 (+0.823)
+
+             # Final result:
+             5.555 +- 0.213 seconds time elapsed  ( +-  3.83% )
+
 -G name::
 --cgroup name::
 monitor only in the container (cgroup) called "name". This option is available only
diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c
index 3a94647ef6bc..72553937c010 100644
--- a/tools/perf/builtin-stat.c
+++ b/tools/perf/builtin-stat.c
@@ -164,6 +164,7 @@ static bool			forever				= false;
 static bool			metric_only			= false;
 static bool			force_metric_only		= false;
 static bool			no_merge			= false;
+static bool			walltime_run_table		= false;
 static struct timespec		ref_time;
 static struct cpu_map		*aggr_map;
 static aggr_get_id_t		aggr_get_id;
@@ -173,6 +174,7 @@ static const char		*output_name;
 static int			output_fd;
 static int			print_free_counters_hint;
 static int			print_mixed_hw_group_error;
+static u64			*walltime_run;
 
 struct perf_stat {
 	bool			 record;
@@ -569,7 +571,7 @@ static struct perf_evsel *perf_evsel__reset_weak_group(struct perf_evsel *evsel)
 	return leader;
 }
 
-static int __run_perf_stat(int argc, const char **argv)
+static int __run_perf_stat(int argc, const char **argv, int run_idx)
 {
 	int interval = stat_config.interval;
 	int times = stat_config.times;
@@ -752,6 +754,9 @@ try_again:
 
 	t1 = rdclock();
 
+	if (walltime_run_table)
+		walltime_run[run_idx] = t1 - t0;
+
 	update_stats(&walltime_nsecs_stats, t1 - t0);
 
 	/*
@@ -766,7 +771,7 @@ try_again:
 	return WEXITSTATUS(status);
 }
 
-static int run_perf_stat(int argc, const char **argv)
+static int run_perf_stat(int argc, const char **argv, int run_idx)
 {
 	int ret;
 
@@ -779,7 +784,7 @@ static int run_perf_stat(int argc, const char **argv)
 	if (sync_run)
 		sync();
 
-	ret = __run_perf_stat(argc, argv);
+	ret = __run_perf_stat(argc, argv, run_idx);
 	if (ret)
 		return ret;
 
@@ -1772,6 +1777,27 @@ static int get_precision(double num)
 	return lround(ceil(-log10(num)));
 }
 
+static void print_table(FILE *output, int precision, double avg)
+{
+	char tmp[64];
+	int idx, indent = 0;
+
+	scnprintf(tmp, 64, " %17.*f", precision, avg);
+	while (tmp[indent] == ' ')
+		indent++;
+
+	fprintf(output, "%*s# Table of individual measurements:\n", indent, "");
+
+	for (idx = 0; idx < run_count; idx++) {
+		double run = (double) walltime_run[idx] / NSEC_PER_SEC;
+
+		fprintf(output, " %17.*f (%+.*f)\n",
+			precision, run, precision, run - avg);
+	}
+
+	fprintf(output, "\n%*s# Final result:\n", indent, "");
+}
+
 static void print_footer(void)
 {
 	double avg = avg_stats(&walltime_nsecs_stats) / NSEC_PER_SEC;
@@ -1791,6 +1817,9 @@ static void print_footer(void)
 		 */
 		int precision = get_precision(sd) + 2;
 
+		if (walltime_run_table)
+			print_table(output, precision, avg);
+
 		fprintf(output, " %17.*f +- %.*f seconds time elapsed",
 			precision, avg, precision, sd);
 
@@ -1970,6 +1999,8 @@ static const struct option stat_options[] = {
 		    "be more verbose (show counter open errors, etc)"),
 	OPT_INTEGER('r', "repeat", &run_count,
 		    "repeat command and print average + stddev (max: 100, forever: 0)"),
+	OPT_BOOLEAN(0, "table", &walltime_run_table,
+		    "display details about each run (only with -r option)"),
 	OPT_BOOLEAN('n', "null", &null_run,
 		    "null run - dont start any counters"),
 	OPT_INCR('d', "detailed", &detailed_run,
@@ -2861,6 +2892,13 @@ int cmd_stat(int argc, const char **argv)
 		goto out;
 	}
 
+	if (walltime_run_table && run_count <= 1) {
+		fprintf(stderr, "--table is only supported with -r\n");
+		parse_options_usage(stat_usage, stat_options, "r", 1);
+		parse_options_usage(NULL, stat_options, "table", 0);
+		goto out;
+	}
+
 	if (output_fd < 0) {
 		fprintf(stderr, "argument to --log-fd must be a > 0\n");
 		parse_options_usage(stat_usage, stat_options, "log-fd", 0);
@@ -2915,6 +2953,14 @@ int cmd_stat(int argc, const char **argv)
 		run_count = 1;
 	}
 
+	if (walltime_run_table) {
+		walltime_run = zalloc(run_count * sizeof(walltime_run[0]));
+		if (!walltime_run) {
+			pr_err("failed to setup -r option");
+			goto out;
+		}
+	}
+
 	if ((stat_config.aggr_mode == AGGR_THREAD) &&
 		!target__has_task(&target)) {
 		if (!target.system_wide || target.cpu_list) {
@@ -3030,7 +3076,7 @@ int cmd_stat(int argc, const char **argv)
 			fprintf(output, "[ perf stat: executing run #%d ... ]\n",
 				run_idx + 1);
 
-		status = run_perf_stat(argc, argv);
+		status = run_perf_stat(argc, argv, run_idx);
 		if (forever && status != -1) {
 			print_counters(NULL, argc, argv);
 			perf_stat__reset_stats();
@@ -3078,6 +3124,8 @@ int cmd_stat(int argc, const char **argv)
 	perf_stat__exit_aggr_mode();
 	perf_evlist__free_stats(evsel_list);
 out:
+	free(walltime_run);
+
 	if (smi_cost && smi_reset)
 		sysfs__write_int(FREEZE_ON_SMI_PATH, 0);
 
diff --git a/tools/perf/util/stat.h b/tools/perf/util/stat.h
index 8f56ba4fd258..36efb986f7fc 100644
--- a/tools/perf/util/stat.h
+++ b/tools/perf/util/stat.h
@@ -7,8 +7,7 @@
 #include "xyarray.h"
 #include "rblist.h"
 
-struct stats
-{
+struct stats {
 	double n, mean, M2;
 	u64 max, min;
 };

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

* [tip:perf/core] perf stat: Display length strings of each run for --table option
  2018-04-23  9:08 ` [PATCH 8/9] perf stat: Display length strings of each run for --table option Jiri Olsa
@ 2018-05-02 17:42   ` tip-bot for Jiri Olsa
  0 siblings, 0 replies; 29+ messages in thread
From: tip-bot for Jiri Olsa @ 2018-05-02 17:42 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: dsahern, jolsa, mingo, peterz, linux-kernel, tglx, namhyung,
	alexander.shishkin, acme, hpa

Commit-ID:  abc60bad0030193ffb55e438664bc09ac53939cf
Gitweb:     https://git.kernel.org/tip/abc60bad0030193ffb55e438664bc09ac53939cf
Author:     Jiri Olsa <jolsa@kernel.org>
AuthorDate: Mon, 23 Apr 2018 11:08:22 +0200
Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Thu, 26 Apr 2018 09:30:27 -0300

perf stat: Display length strings of each run for --table option

Adding support to display visual aid 'length strings' to easily spot the
biggest difference in time table.

  $ perf stat -r 10 --table perf bench sched pipe
  ...

   Performance counter stats for './perf bench sched pipe' (5 runs):

             # Table of individual measurements:
             5.189 (-0.293) #
             5.189 (-0.294) #
             5.186 (-0.296) #
             5.663 (+0.181) ##
             6.186 (+0.703) ####

             # Final result:
             5.483 +- 0.198 seconds time elapsed  ( +-  3.62% )

Suggested-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20180423090823.32309-9-jolsa@kernel.org
[ Updated 'perf stat --table' man page entry ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/Documentation/perf-stat.txt | 12 ++++++------
 tools/perf/builtin-stat.c              |  8 +++++++-
 2 files changed, 13 insertions(+), 7 deletions(-)

diff --git a/tools/perf/Documentation/perf-stat.txt b/tools/perf/Documentation/perf-stat.txt
index 72a2414513bd..3a822f308e6d 100644
--- a/tools/perf/Documentation/perf-stat.txt
+++ b/tools/perf/Documentation/perf-stat.txt
@@ -123,14 +123,14 @@ spreadsheets. Columns are separated by the string specified in SEP.
    Performance counter stats for 'perf bench sched pipe' (5 runs):
 
              # Table of individual measurements:
-             5.379 (-0.176)
-             5.243 (-0.311)
-             5.238 (-0.317)
-             5.536 (-0.019)
-             6.377 (+0.823)
+             5.189 (-0.293) #
+             5.189 (-0.294) #
+             5.186 (-0.296) #
+             5.663 (+0.181) ##
+             6.186 (+0.703) ####
 
              # Final result:
-             5.555 +- 0.213 seconds time elapsed  ( +-  3.83% )
+             5.483 +- 0.198 seconds time elapsed  ( +-  3.62% )
 
 -G name::
 --cgroup name::
diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c
index 72553937c010..a4f662a462c6 100644
--- a/tools/perf/builtin-stat.c
+++ b/tools/perf/builtin-stat.c
@@ -1790,9 +1790,15 @@ static void print_table(FILE *output, int precision, double avg)
 
 	for (idx = 0; idx < run_count; idx++) {
 		double run = (double) walltime_run[idx] / NSEC_PER_SEC;
+		int h, n = 1 + abs((int) (100.0 * (run - avg)/run) / 5);
 
-		fprintf(output, " %17.*f (%+.*f)\n",
+		fprintf(output, " %17.*f (%+.*f) ",
 			precision, run, precision, run - avg);
+
+		for (h = 0; h < n; h++)
+			fprintf(output, "#");
+
+		fprintf(output, "\n");
 	}
 
 	fprintf(output, "\n%*s# Final result:\n", indent, "");

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

end of thread, other threads:[~2018-05-02 17:43 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-23  9:08 [PATCH 0/9] perf tools: Assorted fixes Jiri Olsa
2018-04-23  9:08 ` [PATCH 1/9] perf check-headers.sh: Simplify arguments passing Jiri Olsa
2018-05-02 17:40   ` [tip:perf/core] " tip-bot for Jiri Olsa
2018-04-23  9:08 ` [PATCH 2/9] perf check-headers.sh: Add support to check 2 independent files Jiri Olsa
2018-04-23 14:28   ` Arnaldo Carvalho de Melo
2018-05-02 17:41   ` [tip:perf/core] " tip-bot for Jiri Olsa
2018-04-23  9:08 ` [PATCH 3/9] perf stat: Keep the / modifier separator in fallback Jiri Olsa
2018-04-23 14:16   ` Arnaldo Carvalho de Melo
2018-04-26  5:53   ` [tip:perf/urgent] " tip-bot for Jiri Olsa
2018-04-23  9:08 ` [PATCH 4/9] perf tools: Fix pmu events parsing rule Jiri Olsa
2018-04-23 14:20   ` Arnaldo Carvalho de Melo
2018-04-23 14:25     ` Jiri Olsa
2018-04-26  5:54   ` [tip:perf/urgent] perf pmu: " tip-bot for Jiri Olsa
2018-04-23  9:08 ` [PATCH 5/9] perf tools: Disable write_backward for leader sampling group events Jiri Olsa
2018-04-23 14:23   ` Arnaldo Carvalho de Melo
2018-04-26  5:54   ` [tip:perf/urgent] perf evsel: " tip-bot for Jiri Olsa
2018-04-23  9:08 ` [PATCH 6/9] perf stat: Display time in precision based on std deviation Jiri Olsa
2018-04-23 14:40   ` Arnaldo Carvalho de Melo
2018-05-02 17:41   ` [tip:perf/core] " tip-bot for Jiri Olsa
2018-04-23  9:08 ` [PATCH 7/9] perf stat: Add --table option to display time of each run Jiri Olsa
2018-04-23 14:41   ` Arnaldo Carvalho de Melo
2018-04-23 15:29     ` Jiri Olsa
2018-05-02 17:42   ` [tip:perf/core] " tip-bot for Jiri Olsa
2018-04-23  9:08 ` [PATCH 8/9] perf stat: Display length strings of each run for --table option Jiri Olsa
2018-05-02 17:42   ` [tip:perf/core] " tip-bot for Jiri Olsa
2018-04-23  9:08 ` [PATCH 9/9] perf stat: Display user and system time Jiri Olsa
2018-04-23 14:51   ` Arnaldo Carvalho de Melo
2018-04-23 15:30     ` Jiri Olsa
2018-04-23 18:48 ` [PATCH 0/9] perf tools: Assorted fixes 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.