* [PATCH 01/12] perf hists: Save the callchain_size in struct hist_entry
2018-06-11 17:47 [GIT PULL 00/12] perf/urgent fixes and improvements Arnaldo Carvalho de Melo
@ 2018-06-11 17:47 ` Arnaldo Carvalho de Melo
2018-06-11 17:48 ` [PATCH 02/12] perf hists: Make hist_entry__has_callchains() work with 'perf c2c' Arnaldo Carvalho de Melo
` (11 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: Arnaldo Carvalho de Melo @ 2018-06-11 17:47 UTC (permalink / raw)
To: Ingo Molnar
Cc: Clark Williams, linux-kernel, linux-perf-users,
Arnaldo Carvalho de Melo, Adrian Hunter, David Ahern, Jin Yao,
Jiri Olsa, Namhyung Kim, Wang Nan
From: Arnaldo Carvalho de Melo <acme@redhat.com>
So that we can figure out the real size of the struct and also be able
to tell if callchains may be present in this histogram entry.
Since we can't always guarantee that from hist_entry->hists we can use
hists_to_evsel, to then look at evsel->attr.sample_type for
PERF_SAMPLE_CALLCHAIN, like with the 'perf c2c' tool, that uses plain
'struct hists' instances, we need another way of deciding if a specific
hist_entry instance has callchains associated with it, i.e. if its
hist_entry->callchain[0] has space allocated for.
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jin Yao <yao.jin@linux.intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: https://lkml.kernel.org/n/tip-ptvndealxs1k7myluvu9flnq@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/util/hist.c | 6 ++++--
tools/perf/util/sort.h | 2 ++
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/tools/perf/util/hist.c b/tools/perf/util/hist.c
index 52e8fda93a47..0441a92b855f 100644
--- a/tools/perf/util/hist.c
+++ b/tools/perf/util/hist.c
@@ -370,9 +370,11 @@ void hists__delete_entries(struct hists *hists)
static int hist_entry__init(struct hist_entry *he,
struct hist_entry *template,
- bool sample_self)
+ bool sample_self,
+ size_t callchain_size)
{
*he = *template;
+ he->callchain_size = callchain_size;
if (symbol_conf.cumulate_callchain) {
he->stat_acc = malloc(sizeof(he->stat));
@@ -473,7 +475,7 @@ static struct hist_entry *hist_entry__new(struct hist_entry *template,
he = ops->new(callchain_size);
if (he) {
- err = hist_entry__init(he, template, sample_self);
+ err = hist_entry__init(he, template, sample_self, callchain_size);
if (err) {
ops->free(he);
he = NULL;
diff --git a/tools/perf/util/sort.h b/tools/perf/util/sort.h
index 7cf2d5cc038e..9ab9257ed887 100644
--- a/tools/perf/util/sort.h
+++ b/tools/perf/util/sort.h
@@ -112,6 +112,8 @@ struct hist_entry {
char level;
u8 filtered;
+
+ u16 callchain_size;
union {
/*
* Since perf diff only supports the stdio output, TUI
--
2.14.3
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 02/12] perf hists: Make hist_entry__has_callchains() work with 'perf c2c'
2018-06-11 17:47 [GIT PULL 00/12] perf/urgent fixes and improvements Arnaldo Carvalho de Melo
2018-06-11 17:47 ` [PATCH 01/12] perf hists: Save the callchain_size in struct hist_entry Arnaldo Carvalho de Melo
@ 2018-06-11 17:48 ` Arnaldo Carvalho de Melo
2018-06-11 17:48 ` [PATCH 03/12] perf hists browser gtk: Use hist_entry__has_callchains() Arnaldo Carvalho de Melo
` (10 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: Arnaldo Carvalho de Melo @ 2018-06-11 17:48 UTC (permalink / raw)
To: Ingo Molnar
Cc: Clark Williams, linux-kernel, linux-perf-users,
Arnaldo Carvalho de Melo, Adrian Hunter, David Ahern,
Namhyung Kim, Wang Nan
From: Arnaldo Carvalho de Melo <acme@redhat.com>
Since 'perf c2c' uses 'struct hists' not allocated together with a
'struct perf_evsel' instance, we can't go from a 'struct hist_entry'
pointer to a 'struct perf_evsel' via he->hists, so, instead, check if
space was set aside for hist_entry->callchain[0] at hist_entry__new()
time.
Reported-by: Jin Yao <yao.jin@linux.intel.com>
Reported-by: Jiri Olsa <jolsa@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
Fixes: fabd37b837f6 ("perf hists: Check if a hist_entry has callchains before using them")
Link: https://lkml.kernel.org/n/tip-e8ife8djvvvwmeze3s4yodii@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/util/sort.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/perf/util/sort.h b/tools/perf/util/sort.h
index 9ab9257ed887..8bf302cafcec 100644
--- a/tools/perf/util/sort.h
+++ b/tools/perf/util/sort.h
@@ -155,7 +155,7 @@ struct hist_entry {
static __pure inline bool hist_entry__has_callchains(struct hist_entry *he)
{
- return hists__has_callchains(he->hists);
+ return he->callchain_size != 0;
}
static inline bool hist_entry__has_pairs(struct hist_entry *he)
--
2.14.3
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 03/12] perf hists browser gtk: Use hist_entry__has_callchains()
2018-06-11 17:47 [GIT PULL 00/12] perf/urgent fixes and improvements Arnaldo Carvalho de Melo
2018-06-11 17:47 ` [PATCH 01/12] perf hists: Save the callchain_size in struct hist_entry Arnaldo Carvalho de Melo
2018-06-11 17:48 ` [PATCH 02/12] perf hists: Make hist_entry__has_callchains() work with 'perf c2c' Arnaldo Carvalho de Melo
@ 2018-06-11 17:48 ` Arnaldo Carvalho de Melo
2018-06-11 17:48 ` [PATCH 04/12] perf hists: Reimplement hists__has_callchains() Arnaldo Carvalho de Melo
` (9 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: Arnaldo Carvalho de Melo @ 2018-06-11 17:48 UTC (permalink / raw)
To: Ingo Molnar
Cc: Clark Williams, linux-kernel, linux-perf-users,
Arnaldo Carvalho de Melo, Adrian Hunter, David Ahern, Jin Yao,
Jiri Olsa, Namhyung Kim, Wang Nan
From: Arnaldo Carvalho de Melo <acme@redhat.com>
Since we can't go from struct hists to struct evsel for all cases (c2c
is an exception) and we have access to the hist_entry, use
hist_entry__has_callchains() in the GTK+ hists browser to figure out
if callchains are available.
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jin Yao <yao.jin@linux.intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: https://lkml.kernel.org/n/tip-8owkgrruzzi5emvblwh4e6le@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/ui/gtk/hists.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/perf/ui/gtk/hists.c b/tools/perf/ui/gtk/hists.c
index b085f1b3e34d..4ab663ec3e5e 100644
--- a/tools/perf/ui/gtk/hists.c
+++ b/tools/perf/ui/gtk/hists.c
@@ -382,7 +382,7 @@ static void perf_gtk__show_hists(GtkWidget *window, struct hists *hists,
gtk_tree_store_set(store, &iter, col_idx++, s, -1);
}
- if (hists__has_callchains(hists) &&
+ if (hist_entry__has_callchains(h) &&
symbol_conf.use_callchain && hists__has(hists, sym)) {
if (callchain_param.mode == CHAIN_GRAPH_REL)
total = symbol_conf.cumulate_callchain ?
--
2.14.3
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 04/12] perf hists: Reimplement hists__has_callchains()
2018-06-11 17:47 [GIT PULL 00/12] perf/urgent fixes and improvements Arnaldo Carvalho de Melo
` (2 preceding siblings ...)
2018-06-11 17:48 ` [PATCH 03/12] perf hists browser gtk: Use hist_entry__has_callchains() Arnaldo Carvalho de Melo
@ 2018-06-11 17:48 ` Arnaldo Carvalho de Melo
2018-06-11 17:48 ` [PATCH 05/12] perf tools: Fix error index for pmu event parser Arnaldo Carvalho de Melo
` (8 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: Arnaldo Carvalho de Melo @ 2018-06-11 17:48 UTC (permalink / raw)
To: Ingo Molnar
Cc: Clark Williams, linux-kernel, linux-perf-users,
Arnaldo Carvalho de Melo, Adrian Hunter, David Ahern, Jin Yao,
Jiri Olsa, Namhyung Kim, Wang Nan
From: Arnaldo Carvalho de Melo <acme@redhat.com>
There are places where we have only access to struct hists and need to
know if any of its hist_entries has callchains, like when drawing
headers for the various output modes (stdio, TUI, etc), so, when adding
a new hist_entry, check if it has callchains, storing this info for
later use by hists__has_callchains().
This reimplementation is necessary because not always a 'struct hists'
is allocated together with a 'struct perf evsel', so we can't go from
'hists' to 'perf_event_attr.sample_type & PERF_SAMPLE_CALLCHAIN'.
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jin Yao <yao.jin@linux.intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: https://lkml.kernel.org/n/tip-hg5g7yddjio3ljwyqnnaj5dt@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/util/hist.c | 6 ++++--
tools/perf/util/hist.h | 4 ++--
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/tools/perf/util/hist.c b/tools/perf/util/hist.c
index 0441a92b855f..828cb9794c76 100644
--- a/tools/perf/util/hist.c
+++ b/tools/perf/util/hist.c
@@ -621,9 +621,11 @@ __hists__add_entry(struct hists *hists,
.raw_data = sample->raw_data,
.raw_size = sample->raw_size,
.ops = ops,
- };
+ }, *he = hists__findnew_entry(hists, &entry, al, sample_self);
- return hists__findnew_entry(hists, &entry, al, sample_self);
+ if (!hists->has_callchains && he && he->callchain_size != 0)
+ hists->has_callchains = true;
+ return he;
}
struct hist_entry *hists__add_entry(struct hists *hists,
diff --git a/tools/perf/util/hist.h b/tools/perf/util/hist.h
index 06607c434949..73049f7f0f60 100644
--- a/tools/perf/util/hist.h
+++ b/tools/perf/util/hist.h
@@ -85,6 +85,7 @@ struct hists {
struct events_stats stats;
u64 event_stream;
u16 col_len[HISTC_NR_COLS];
+ bool has_callchains;
int socket_filter;
struct perf_hpp_list *hpp_list;
struct list_head hpp_formats;
@@ -222,8 +223,7 @@ static inline struct hists *evsel__hists(struct perf_evsel *evsel)
static __pure inline bool hists__has_callchains(struct hists *hists)
{
- const struct perf_evsel *evsel = hists_to_evsel(hists);
- return evsel__has_callchain(evsel);
+ return hists->has_callchains;
}
int hists__init(void);
--
2.14.3
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 05/12] perf tools: Fix error index for pmu event parser
2018-06-11 17:47 [GIT PULL 00/12] perf/urgent fixes and improvements Arnaldo Carvalho de Melo
` (3 preceding siblings ...)
2018-06-11 17:48 ` [PATCH 04/12] perf hists: Reimplement hists__has_callchains() Arnaldo Carvalho de Melo
@ 2018-06-11 17:48 ` Arnaldo Carvalho de Melo
2018-06-11 17:48 ` [PATCH 06/12] perf stat: Add --interval-clear option Arnaldo Carvalho de Melo
` (7 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: Arnaldo Carvalho de Melo @ 2018-06-11 17:48 UTC (permalink / raw)
To: Ingo Molnar
Cc: Clark Williams, linux-kernel, linux-perf-users, Jiri Olsa,
Alexander Shishkin, Andi Kleen, David Ahern, Frederic Weisbecker,
Milian Wolff, Namhyung Kim, Peter Zijlstra, Stephane Eranian,
Arnaldo Carvalho de Melo
From: Jiri Olsa <jolsa@kernel.org>
For events we provide specific error message we need to set error column
index, PMU parser is missing that, adding it.
Before:
$ perf stat -e cycles,krava/cycles/ kill
event syntax error: 'cycles,krava/cycles/'
\___ Cannot find PMU `krava'. Missing kernel support?
After:
$ perf stat -e cycles,krava/cycles/ kill
event syntax error: 'cycles,krava/cycles/'
\___ Cannot find PMU `krava'. Missing kernel support?
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 <andi@firstfloor.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <frederic@kernel.org>
Cc: Milian Wolff <milian.wolff@kdab.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/20180606221513.11302-3-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/util/parse-events.y | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/tools/perf/util/parse-events.y b/tools/perf/util/parse-events.y
index 155d2570274f..da8fe57691b8 100644
--- a/tools/perf/util/parse-events.y
+++ b/tools/perf/util/parse-events.y
@@ -227,11 +227,16 @@ event_def: event_pmu |
event_pmu:
PE_NAME opt_pmu_config
{
+ struct parse_events_state *parse_state = _parse_state;
+ struct parse_events_error *error = parse_state->error;
struct list_head *list, *orig_terms, *terms;
if (parse_events_copy_term_list($2, &orig_terms))
YYABORT;
+ if (error)
+ error->idx = @1.first_column;
+
ALLOC_LIST(list);
if (parse_events_add_pmu(_parse_state, list, $1, $2, false, false)) {
struct perf_pmu *pmu = NULL;
--
2.14.3
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 06/12] perf stat: Add --interval-clear option
2018-06-11 17:47 [GIT PULL 00/12] perf/urgent fixes and improvements Arnaldo Carvalho de Melo
` (4 preceding siblings ...)
2018-06-11 17:48 ` [PATCH 05/12] perf tools: Fix error index for pmu event parser Arnaldo Carvalho de Melo
@ 2018-06-11 17:48 ` Arnaldo Carvalho de Melo
2018-06-11 17:48 ` [PATCH 07/12] perf stat: Use only color_fprintf call in print_metric_only Arnaldo Carvalho de Melo
` (6 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: Arnaldo Carvalho de Melo @ 2018-06-11 17:48 UTC (permalink / raw)
To: Ingo Molnar
Cc: Clark Williams, linux-kernel, linux-perf-users, Jiri Olsa,
Alexander Shishkin, Andi Kleen, David Ahern, Frederic Weisbecker,
Milian Wolff, Namhyung Kim, Peter Zijlstra, Stephane Eranian,
Arnaldo Carvalho de Melo
From: Jiri Olsa <jolsa@kernel.org>
Adding --interval-clear option to clear the screen before next interval.
Committer testing:
# perf stat -I 1000 --interval-clear
And, as expected, it behaves almost like:
# watch -n 0 perf stat -a sleep 1
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 <andi@firstfloor.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <frederic@kernel.org>
Cc: Milian Wolff <milian.wolff@kdab.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/20180606221513.11302-4-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/Documentation/perf-stat.txt | 3 +++
tools/perf/builtin-stat.c | 11 +++++++++--
2 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/tools/perf/Documentation/perf-stat.txt b/tools/perf/Documentation/perf-stat.txt
index 5dfe102fb5b5..b10a90b6a718 100644
--- a/tools/perf/Documentation/perf-stat.txt
+++ b/tools/perf/Documentation/perf-stat.txt
@@ -178,6 +178,9 @@ Print count deltas for fixed number of times.
This option should be used together with "-I" option.
example: 'perf stat -I 1000 --interval-count 2 -e cycles -a'
+--interval-clear::
+Clear the screen before next interval.
+
--timeout msecs::
Stop the 'perf stat' session and print count deltas after N milliseconds (minimum: 10 ms).
This option is not supported with the "-I" option.
diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c
index 096ccb25c11f..f1532e3ac7d7 100644
--- a/tools/perf/builtin-stat.c
+++ b/tools/perf/builtin-stat.c
@@ -65,6 +65,7 @@
#include "util/tool.h"
#include "util/string2.h"
#include "util/metricgroup.h"
+#include "util/top.h"
#include "asm/bug.h"
#include <linux/time64.h>
@@ -173,6 +174,7 @@ static struct cpu_map *aggr_map;
static aggr_get_id_t aggr_get_id;
static bool append_file;
static bool interval_count;
+static bool interval_clear;
static const char *output_name;
static int output_fd;
static int print_free_counters_hint;
@@ -1704,9 +1706,12 @@ static void print_interval(char *prefix, struct timespec *ts)
FILE *output = stat_config.output;
static int num_print_interval;
+ if (interval_clear)
+ puts(CONSOLE_CLEAR);
+
sprintf(prefix, "%6lu.%09lu%s", ts->tv_sec, ts->tv_nsec, csv_sep);
- if (num_print_interval == 0 && !csv_output) {
+ if ((num_print_interval == 0 && !csv_output) || interval_clear) {
switch (stat_config.aggr_mode) {
case AGGR_SOCKET:
fprintf(output, "# time socket cpus");
@@ -1738,7 +1743,7 @@ static void print_interval(char *prefix, struct timespec *ts)
}
}
- if (num_print_interval == 0 && metric_only)
+ if ((num_print_interval == 0 && metric_only) || interval_clear)
print_metric_headers(" ", true);
if (++num_print_interval == 25)
num_print_interval = 0;
@@ -2057,6 +2062,8 @@ static const struct option stat_options[] = {
"(overhead is possible for values <= 100ms)"),
OPT_INTEGER(0, "interval-count", &stat_config.times,
"print counts for fixed number of times"),
+ OPT_BOOLEAN(0, "interval-clear", &interval_clear,
+ "clear screen in between new interval"),
OPT_UINTEGER(0, "timeout", &stat_config.timeout,
"stop workload and print counts after a timeout period in ms (>= 10ms)"),
OPT_SET_UINT(0, "per-socket", &stat_config.aggr_mode,
--
2.14.3
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 07/12] perf stat: Use only color_fprintf call in print_metric_only
2018-06-11 17:47 [GIT PULL 00/12] perf/urgent fixes and improvements Arnaldo Carvalho de Melo
` (5 preceding siblings ...)
2018-06-11 17:48 ` [PATCH 06/12] perf stat: Add --interval-clear option Arnaldo Carvalho de Melo
@ 2018-06-11 17:48 ` Arnaldo Carvalho de Melo
2018-06-11 17:48 ` [PATCH 08/12] perf stat: Fix metric column header display alignment Arnaldo Carvalho de Melo
` (5 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: Arnaldo Carvalho de Melo @ 2018-06-11 17:48 UTC (permalink / raw)
To: Ingo Molnar
Cc: Clark Williams, linux-kernel, linux-perf-users, Jiri Olsa,
Alexander Shishkin, Andi Kleen, David Ahern, Frederic Weisbecker,
Milian Wolff, Namhyung Kim, Peter Zijlstra, Stephane Eranian,
Arnaldo Carvalho de Melo
From: Jiri Olsa <jolsa@kernel.org>
We can call color_fprintf also for non color case, it's handled
properly. This change simplifies following patch.
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <frederic@kernel.org>
Cc: Milian Wolff <milian.wolff@kdab.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/20180606221513.11302-5-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/builtin-stat.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c
index f1532e3ac7d7..9e7b6f108956 100644
--- a/tools/perf/builtin-stat.c
+++ b/tools/perf/builtin-stat.c
@@ -1008,10 +1008,7 @@ static void print_metric_only(void *ctx, const char *color, const char *fmt,
if (!valid_only_metric(unit))
return;
unit = fixunit(buf, os->evsel, unit);
- if (color)
- n = color_fprintf(out, color, fmt, val);
- else
- n = fprintf(out, fmt, val);
+ n = color_fprintf(out, color ?: "", fmt, val);
if (n > METRIC_ONLY_LEN)
n = METRIC_ONLY_LEN;
if (mlen < strlen(unit))
--
2.14.3
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 08/12] perf stat: Fix metric column header display alignment
2018-06-11 17:47 [GIT PULL 00/12] perf/urgent fixes and improvements Arnaldo Carvalho de Melo
` (6 preceding siblings ...)
2018-06-11 17:48 ` [PATCH 07/12] perf stat: Use only color_fprintf call in print_metric_only Arnaldo Carvalho de Melo
@ 2018-06-11 17:48 ` Arnaldo Carvalho de Melo
2018-06-11 17:48 ` [PATCH 09/12] perf stat: Allow to specify specific metric column len Arnaldo Carvalho de Melo
` (4 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: Arnaldo Carvalho de Melo @ 2018-06-11 17:48 UTC (permalink / raw)
To: Ingo Molnar
Cc: Clark Williams, linux-kernel, linux-perf-users, Jiri Olsa,
Alexander Shishkin, Andi Kleen, David Ahern, Frederic Weisbecker,
Milian Wolff, Namhyung Kim, Peter Zijlstra, Stephane Eranian,
Arnaldo Carvalho de Melo
From: Jiri Olsa <jolsa@kernel.org>
Make the metric only display aligned.
Before:
# perf stat --topdown -I 1000
# time core cpus retiring bad speculation frontend bound backend bound
1.000394323 S0-C0 2 37.4% 12.0% 31.4% 19.2%
1.000394323 S0-C1 2 25.1% 9.2% 43.8% 21.9%
2.001521204 S0-C0 2 36.4% 11.4% 32.4% 19.8%
2.001521204 S0-C1 2 26.2% 9.4% 43.1% 21.3%
3.001930208 S0-C0 2 35.1% 10.7% 33.6% 20.6%
3.001930208 S0-C1 2 28.9% 10.0% 40.0% 21.1%
After:
# perf stat --topdown -I 1000
# time core cpus retiring bad speculation frontend bound backend bound
1.000303722 S0-C0 2 34.2% 7.6% 34.2% 24.0%
1.000303722 S0-C1 2 33.1% 6.4% 36.9% 23.6%
2.001281055 S0-C0 2 34.6% 6.7% 36.8% 21.8%
2.001281055 S0-C1 2 32.8% 7.1% 38.1% 22.0%
3.001546080 S0-C0 2 39.3% 5.5% 32.7% 22.5%
3.001546080 S0-C1 2 37.8% 6.0% 33.1% 23.1%
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 <andi@firstfloor.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <frederic@kernel.org>
Cc: Milian Wolff <milian.wolff@kdab.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/20180606221513.11302-6-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/builtin-stat.c | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c
index 9e7b6f108956..8f3fdc052728 100644
--- a/tools/perf/builtin-stat.c
+++ b/tools/perf/builtin-stat.c
@@ -1001,19 +1001,20 @@ static void print_metric_only(void *ctx, const char *color, const char *fmt,
{
struct outstate *os = ctx;
FILE *out = os->fh;
- int n;
- char buf[1024];
+ char buf[1024], str[1024];
unsigned mlen = METRIC_ONLY_LEN;
if (!valid_only_metric(unit))
return;
unit = fixunit(buf, os->evsel, unit);
- n = color_fprintf(out, color ?: "", fmt, val);
- if (n > METRIC_ONLY_LEN)
- n = METRIC_ONLY_LEN;
if (mlen < strlen(unit))
mlen = strlen(unit) + 1;
- fprintf(out, "%*s", mlen - n, "");
+
+ if (color)
+ mlen += strlen(color) + sizeof(PERF_COLOR_RESET) - 1;
+
+ color_snprintf(str, sizeof(str), color ?: "", fmt, val);
+ fprintf(out, "%*s ", mlen, str);
}
static void print_metric_only_csv(void *ctx, const char *color __maybe_unused,
@@ -1053,7 +1054,7 @@ static void print_metric_header(void *ctx, const char *color __maybe_unused,
if (csv_output)
fprintf(os->fh, "%s%s", unit, csv_sep);
else
- fprintf(os->fh, "%-*s ", METRIC_ONLY_LEN, unit);
+ fprintf(os->fh, "%*s ", METRIC_ONLY_LEN, unit);
}
static void nsec_printout(int id, int nr, struct perf_evsel *evsel, double avg)
@@ -1721,7 +1722,7 @@ static void print_interval(char *prefix, struct timespec *ts)
fprintf(output, " counts %*s events\n", unit_width, "unit");
break;
case AGGR_NONE:
- fprintf(output, "# time CPU");
+ fprintf(output, "# time CPU ");
if (!metric_only)
fprintf(output, " counts %*s events\n", unit_width, "unit");
break;
--
2.14.3
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 09/12] perf stat: Allow to specify specific metric column len
2018-06-11 17:47 [GIT PULL 00/12] perf/urgent fixes and improvements Arnaldo Carvalho de Melo
` (7 preceding siblings ...)
2018-06-11 17:48 ` [PATCH 08/12] perf stat: Fix metric column header display alignment Arnaldo Carvalho de Melo
@ 2018-06-11 17:48 ` Arnaldo Carvalho de Melo
2018-06-11 17:48 ` [PATCH 10/12] perf stat: Add event parsing error handling to add_default_attributes Arnaldo Carvalho de Melo
` (3 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: Arnaldo Carvalho de Melo @ 2018-06-11 17:48 UTC (permalink / raw)
To: Ingo Molnar
Cc: Clark Williams, linux-kernel, linux-perf-users, Jiri Olsa,
Alexander Shishkin, Andi Kleen, David Ahern, Frederic Weisbecker,
Milian Wolff, Namhyung Kim, Peter Zijlstra, Stephane Eranian,
Arnaldo Carvalho de Melo
From: Jiri Olsa <jolsa@kernel.org>
The following change will introduce new metrics, that doesn't need such
wide hard coded spacing. Switch METRIC_ONLY_LEN macro usage with
metric_only_len variable.
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <frederic@kernel.org>
Cc: Milian Wolff <milian.wolff@kdab.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/20180606221513.11302-7-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/builtin-stat.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c
index 8f3fdc052728..3fc1f5286d50 100644
--- a/tools/perf/builtin-stat.c
+++ b/tools/perf/builtin-stat.c
@@ -145,6 +145,8 @@ static struct target target = {
typedef int (*aggr_get_id_t)(struct cpu_map *m, int cpu);
+#define METRIC_ONLY_LEN 20
+
static int run_count = 1;
static bool no_inherit = false;
static volatile pid_t child_pid = -1;
@@ -182,6 +184,7 @@ static int print_mixed_hw_group_error;
static u64 *walltime_run;
static bool ru_display = false;
static struct rusage ru_data;
+static unsigned int metric_only_len = METRIC_ONLY_LEN;
struct perf_stat {
bool record;
@@ -969,8 +972,6 @@ static void print_metric_csv(void *ctx,
fprintf(out, "%s%s%s%s", csv_sep, vals, csv_sep, unit);
}
-#define METRIC_ONLY_LEN 20
-
/* Filter out some columns that don't work well in metrics only mode */
static bool valid_only_metric(const char *unit)
@@ -1002,7 +1003,7 @@ static void print_metric_only(void *ctx, const char *color, const char *fmt,
struct outstate *os = ctx;
FILE *out = os->fh;
char buf[1024], str[1024];
- unsigned mlen = METRIC_ONLY_LEN;
+ unsigned mlen = metric_only_len;
if (!valid_only_metric(unit))
return;
@@ -1054,7 +1055,7 @@ static void print_metric_header(void *ctx, const char *color __maybe_unused,
if (csv_output)
fprintf(os->fh, "%s%s", unit, csv_sep);
else
- fprintf(os->fh, "%*s ", METRIC_ONLY_LEN, unit);
+ fprintf(os->fh, "%*s ", metric_only_len, unit);
}
static void nsec_printout(int id, int nr, struct perf_evsel *evsel, double avg)
--
2.14.3
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 10/12] perf stat: Add event parsing error handling to add_default_attributes
2018-06-11 17:47 [GIT PULL 00/12] perf/urgent fixes and improvements Arnaldo Carvalho de Melo
` (8 preceding siblings ...)
2018-06-11 17:48 ` [PATCH 09/12] perf stat: Allow to specify specific metric column len Arnaldo Carvalho de Melo
@ 2018-06-11 17:48 ` Arnaldo Carvalho de Melo
2018-06-11 17:48 ` [PATCH 11/12] perf c2c: Keep struct hist_entry at the end of struct c2c_hist_entry Arnaldo Carvalho de Melo
` (2 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: Arnaldo Carvalho de Melo @ 2018-06-11 17:48 UTC (permalink / raw)
To: Ingo Molnar
Cc: Clark Williams, linux-kernel, linux-perf-users, Jiri Olsa,
Alexander Shishkin, Andi Kleen, David Ahern, Frederic Weisbecker,
Milian Wolff, Namhyung Kim, Peter Zijlstra, Stephane Eranian,
Arnaldo Carvalho de Melo
From: Jiri Olsa <jolsa@kernel.org>
Add missing error handling for parse_events calls in add_default_attributes
functions. The error handler displays error details, like for transactions (-T):
Before:
$ perf stat -T
Cannot set up transaction events
After:
$ perf stat -T
Cannot set up transaction events
event syntax error: '..cycles,cpu/cycles-t/,cpu/tx-start/,cpu/el-start/,cpu/cycles-ct/}'
\___ unknown term
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <frederic@kernel.org>
Cc: Milian Wolff <milian.wolff@kdab.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/20180606221513.11302-8-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/builtin-stat.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c
index 3fc1f5286d50..22547a490e1f 100644
--- a/tools/perf/builtin-stat.c
+++ b/tools/perf/builtin-stat.c
@@ -2442,14 +2442,13 @@ static int add_default_attributes(void)
(PERF_COUNT_HW_CACHE_OP_PREFETCH << 8) |
(PERF_COUNT_HW_CACHE_RESULT_MISS << 16) },
};
+ struct parse_events_error errinfo;
/* Set attrs if no event is selected and !null_run: */
if (null_run)
return 0;
if (transaction_run) {
- struct parse_events_error errinfo;
-
if (pmu_have_event("cpu", "cycles-ct") &&
pmu_have_event("cpu", "el-start"))
err = parse_events(evsel_list, transaction_attrs,
@@ -2460,6 +2459,7 @@ static int add_default_attributes(void)
&errinfo);
if (err) {
fprintf(stderr, "Cannot set up transaction events\n");
+ parse_events_print_error(&errinfo, transaction_attrs);
return -1;
}
return 0;
@@ -2485,10 +2485,11 @@ static int add_default_attributes(void)
pmu_have_event("msr", "smi")) {
if (!force_metric_only)
metric_only = true;
- err = parse_events(evsel_list, smi_cost_attrs, NULL);
+ err = parse_events(evsel_list, smi_cost_attrs, &errinfo);
} else {
fprintf(stderr, "To measure SMI cost, it needs "
"msr/aperf/, msr/smi/ and cpu/cycles/ support\n");
+ parse_events_print_error(&errinfo, smi_cost_attrs);
return -1;
}
if (err) {
@@ -2523,12 +2524,13 @@ static int add_default_attributes(void)
if (topdown_attrs[0] && str) {
if (warn)
arch_topdown_group_warn();
- err = parse_events(evsel_list, str, NULL);
+ err = parse_events(evsel_list, str, &errinfo);
if (err) {
fprintf(stderr,
"Cannot set up top down events %s: %d\n",
str, err);
free(str);
+ parse_events_print_error(&errinfo, str);
return -1;
}
} else {
--
2.14.3
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 11/12] perf c2c: Keep struct hist_entry at the end of struct c2c_hist_entry
2018-06-11 17:47 [GIT PULL 00/12] perf/urgent fixes and improvements Arnaldo Carvalho de Melo
` (9 preceding siblings ...)
2018-06-11 17:48 ` [PATCH 10/12] perf stat: Add event parsing error handling to add_default_attributes Arnaldo Carvalho de Melo
@ 2018-06-11 17:48 ` Arnaldo Carvalho de Melo
2018-06-11 17:48 ` [PATCH 12/12] perf script: Show hw-cache events Arnaldo Carvalho de Melo
2018-06-14 6:13 ` [GIT PULL 00/12] perf/urgent fixes and improvements Ingo Molnar
12 siblings, 0 replies; 14+ messages in thread
From: Arnaldo Carvalho de Melo @ 2018-06-11 17:48 UTC (permalink / raw)
To: Ingo Molnar
Cc: Clark Williams, linux-kernel, linux-perf-users, Jiri Olsa,
Jiri Olsa, Jin Yao, Arnaldo Carvalho de Melo
From: Jiri Olsa <jolsa@redhat.com>
Exactly as the comment just before 'struct c2c_hist_entry" says, i.e.
the last entry in struct hist_entry is a zero length array, that when
allocating space for hist_entry gets extra space if callchains are in
use, which, if hist_entry is not at the end of c2c_hist_entry, the
members after it gets corrupted when callchains get added to the rb
trees collecting them, etc.
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Reported-by: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Jin Yao <yao.jin@linux.intel.com>
Fixes: 7f834c2e84bb ("perf c2c report: Display node for cacheline address")
Link: http://lkml.kernel.org/n/tip-bh0ke4fh2ygpj3yowna7o1di@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/builtin-c2c.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/tools/perf/builtin-c2c.c b/tools/perf/builtin-c2c.c
index 307b3594525f..6a8738f7ead3 100644
--- a/tools/perf/builtin-c2c.c
+++ b/tools/perf/builtin-c2c.c
@@ -56,16 +56,16 @@ struct c2c_hist_entry {
struct compute_stats cstats;
+ unsigned long paddr;
+ unsigned long paddr_cnt;
+ bool paddr_zero;
+ char *nodestr;
+
/*
* must be at the end,
* because of its callchain dynamic entry
*/
struct hist_entry he;
-
- unsigned long paddr;
- unsigned long paddr_cnt;
- bool paddr_zero;
- char *nodestr;
};
static char const *coalesce_default = "pid,iaddr";
--
2.14.3
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 12/12] perf script: Show hw-cache events
2018-06-11 17:47 [GIT PULL 00/12] perf/urgent fixes and improvements Arnaldo Carvalho de Melo
` (10 preceding siblings ...)
2018-06-11 17:48 ` [PATCH 11/12] perf c2c: Keep struct hist_entry at the end of struct c2c_hist_entry Arnaldo Carvalho de Melo
@ 2018-06-11 17:48 ` Arnaldo Carvalho de Melo
2018-06-14 6:13 ` [GIT PULL 00/12] perf/urgent fixes and improvements Ingo Molnar
12 siblings, 0 replies; 14+ messages in thread
From: Arnaldo Carvalho de Melo @ 2018-06-11 17:48 UTC (permalink / raw)
To: Ingo Molnar
Cc: Clark Williams, linux-kernel, linux-perf-users,
Seeteena Thoufeek, Alexander Shishkin, Jiri Olsa, Namhyung Kim,
Peter Zijlstra, Arnaldo Carvalho de Melo
From: Seeteena Thoufeek <s1seetee@linux.vnet.ibm.com>
'perf script' fails to report hardware cache events (PERF_TYPE_HW_CACHE)
where as 'perf report' shows the samples. Fix it. Ex,
# perf record -e L1-dcache-loads ./a.out
[ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 0.008 MB perf.data (11 samples)]
Before patch:
# perf script | wc -l
0
After patch:
# perf script | wc -l
11
Committer testing:
[root@jouet ~]# perf script | head -30 | tail
Timer 9803 [2] 8.963330: 1554 L1-dcache-loads: 7ffef89baae4 __vdso_clock_gettime+0xf4 ([vdso])
swapper 0 [2] 8.963343: 5626 L1-dcache-loads: ffffffffa66f4f6b cpuidle_not_av+0xb (/lib/modules/4.17.0-rc5/build/vmlinux)
firefox 4853 [2] 8.964070: 18935 L1-dcache-loads: 7f0b9a00dc30 xcb_poll_for_event+0x0 (/usr/lib64/libxcb.so.1.1.0)
Softwar~cTh 4928 [2] 8.964548: 15928 L1-dcache-loads: ffffffffa60d795c update_curr+0x10c (/lib/modules/4.17.0-rc5/build/vmlinux)
firefox 4853 [2] 8.964675: 14978 L1-dcache-loads: ffffffffa6897018 mutex_unlock+0x18 (/lib/modules/4.17.0-rc5/build/vmlinux)
gnome-shell 2026 [3] 8.964693: 50670 L1-dcache-loads: 7fa08854de6d g_source_iter_next+0x6d (/usr/lib64/libglib-2.0.so.0.5400.3)
Compositor 4929 [1] 8.964784: 71772 L1-dcache-loads: 7f0b936bf078 [unknown] (/usr/lib64/firefox/libxul.so)
Xwayland 2096 [2] 8.964919: 16799 L1-dcache-loads: 7f68ce2fcb8a glXGetCurrentContext+0x1a (/usr/lib64/libGLX.so.0.0.0)
gnome-shell 2026 [3] 8.964997: 50670 L1-dcache-loads: 7fa08854de6d g_source_iter_next+0x6d (/usr/lib64/libglib-2.0.so.0.5400.3)
[root@jouet ~]#
Signed-off-by: Seeteena Thoufeek <s1seetee@linux.vnet.ibm.com>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/1528455748-20087-1-git-send-email-s1seetee@linux.vnet.ibm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/builtin-script.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c
index b3bf35512d21..a31d7082188e 100644
--- a/tools/perf/builtin-script.c
+++ b/tools/perf/builtin-script.c
@@ -180,6 +180,18 @@ static struct {
PERF_OUTPUT_EVNAME | PERF_OUTPUT_TRACE
},
+ [PERF_TYPE_HW_CACHE] = {
+ .user_set = false,
+
+ .fields = PERF_OUTPUT_COMM | PERF_OUTPUT_TID |
+ PERF_OUTPUT_CPU | PERF_OUTPUT_TIME |
+ PERF_OUTPUT_EVNAME | PERF_OUTPUT_IP |
+ PERF_OUTPUT_SYM | PERF_OUTPUT_SYMOFFSET |
+ PERF_OUTPUT_DSO | PERF_OUTPUT_PERIOD,
+
+ .invalid_fields = PERF_OUTPUT_TRACE | PERF_OUTPUT_BPF_OUTPUT,
+ },
+
[PERF_TYPE_RAW] = {
.user_set = false,
--
2.14.3
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [GIT PULL 00/12] perf/urgent fixes and improvements
2018-06-11 17:47 [GIT PULL 00/12] perf/urgent fixes and improvements Arnaldo Carvalho de Melo
` (11 preceding siblings ...)
2018-06-11 17:48 ` [PATCH 12/12] perf script: Show hw-cache events Arnaldo Carvalho de Melo
@ 2018-06-14 6:13 ` Ingo Molnar
12 siblings, 0 replies; 14+ messages in thread
From: Ingo Molnar @ 2018-06-14 6:13 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo
Cc: Clark Williams, linux-kernel, linux-perf-users, Adrian Hunter,
Alexander Shishkin, Andi Kleen, David Ahern, Frederic Weisbecker,
Jin Yao, Jiri Olsa, Milian Wolff, Namhyung Kim, Peter Zijlstra,
Seeteena Thoufeek, Stephane Eranian, Wang Nan,
Arnaldo Carvalho de Melo
* Arnaldo Carvalho de Melo <acme@kernel.org> wrote:
> Hi Ingo,
>
> Please consider pulling,
>
> - Arnaldo
>
> Test results at the end of this message, as usual.
>
> The following changes since commit 2696ec4566f598ab483a6bebc4ec841b2efb88ec:
>
> Merge tag 'perf-core-for-mingo-4.18-20180606' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent (2018-06-07 07:18:51 +0200)
>
> are available in the Git repository at:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-urgent-for-mingo-4.18-20180611
>
> for you to fetch changes up to fad76d4333fe73cf3f73704aa34d4ce523b1c458:
>
> perf script: Show hw-cache events (2018-06-08 13:41:30 -0300)
>
> ----------------------------------------------------------------
> perf/urgent fixes and improvements:
>
> perf stat:
>
> . Add --interval-clear option, to provide a 'watch' like printing (Jiri Olsa)
>
> . Fix metric column header display alignment (Jiri Olsa)
>
> . Improve error messages for default attributes, providing better output
> for error in command lines such as:
>
> $ perf stat -T
> Cannot set up transaction events
> event syntax error: '..cycles,cpu/cycles-t/,cpu/tx-start/,cpu/el-start/,cpu/cycles-ct/}'
> \___ unknown term
>
> Where the "event syntax error" line now appears (Jiri Olsa)
>
> perf script:
>
> . Show hw-cache events too (Seeteena Thoufeek)
>
> perf c2c:
>
> . Fix data dependency problem in layout of 'struct c2c_hist_entry', where
> its member 'struct hist_entry' must be at the end because it has a ZLA
> as its last member, that gets space when handling callchains (Jiri Olsa)
>
> Core:
>
> - We cannot assume that a 'struct perf_evsel' is to be obtained from a
> container_of operation on a 'struct hists' as there are tools, such as
> 'perf c2c' that uses 'struct hist' instances without having them in
> container structs that also have 'struct perf_evsel' in a particular
> layout, so provide a different way of figuring out if a 'struct hists'
> and 'struct hist_entry' have callchains (Arnaldo Carvalho de Melo)
>
> - Fix error index in the PMU event parser, so that error messages can
> point to the problematic token (Jiri Olsa)
>
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
>
> ----------------------------------------------------------------
> Arnaldo Carvalho de Melo (4):
> perf hists: Save the callchain_size in struct hist_entry
> perf hists: Make hist_entry__has_callchains() work with 'perf c2c'
> perf hists browser gtk: Use hist_entry__has_callchains()
> perf hists: Reimplement hists__has_callchains()
>
> Jiri Olsa (7):
> perf tools: Fix error index for pmu event parser
> perf stat: Add --interval-clear option
> perf stat: Use only color_fprintf call in print_metric_only
> perf stat: Fix metric column header display alignment
> perf stat: Allow to specify specific metric column len
> perf stat: Add event parsing error handling to add_default_attributes
> perf c2c: Keep struct hist_entry at the end of struct c2c_hist_entry
>
> Seeteena Thoufeek (1):
> perf script: Show hw-cache events
>
> tools/perf/Documentation/perf-stat.txt | 3 +++
> tools/perf/builtin-c2c.c | 10 +++----
> tools/perf/builtin-script.c | 12 +++++++++
> tools/perf/builtin-stat.c | 48 ++++++++++++++++++++--------------
> tools/perf/ui/gtk/hists.c | 2 +-
> tools/perf/util/hist.c | 12 ++++++---
> tools/perf/util/hist.h | 4 +--
> tools/perf/util/parse-events.y | 5 ++++
> tools/perf/util/sort.h | 4 ++-
> 9 files changed, 67 insertions(+), 33 deletions(-)
Pulled, thanks a lot Arnaldo!
Ingo
^ permalink raw reply [flat|nested] 14+ messages in thread