mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-20 14:16:02 +00:00
perf stat: Revert checks for duration_time
This reverts e864c5ca14
("perf stat: Hide internal duration_time
counter") but doing it manually since the code has now moved to a
different file.
The next patch will properly implement duration_time as a full event, so
no need to hide it anymore.
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Link: http://lkml.kernel.org/r/20190326221823.11518-2-andi@firstfloor.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
parent
7fcfa9a2d9
commit
c2b3c170db
1 changed files with 0 additions and 18 deletions
|
@ -18,11 +18,6 @@
|
||||||
#define CNTR_NOT_SUPPORTED "<not supported>"
|
#define CNTR_NOT_SUPPORTED "<not supported>"
|
||||||
#define CNTR_NOT_COUNTED "<not counted>"
|
#define CNTR_NOT_COUNTED "<not counted>"
|
||||||
|
|
||||||
static bool is_duration_time(struct perf_evsel *evsel)
|
|
||||||
{
|
|
||||||
return !strcmp(evsel->name, "duration_time");
|
|
||||||
}
|
|
||||||
|
|
||||||
static void print_running(struct perf_stat_config *config,
|
static void print_running(struct perf_stat_config *config,
|
||||||
u64 run, u64 ena)
|
u64 run, u64 ena)
|
||||||
{
|
{
|
||||||
|
@ -628,9 +623,6 @@ static void print_aggr(struct perf_stat_config *config,
|
||||||
ad.id = id = config->aggr_map->map[s];
|
ad.id = id = config->aggr_map->map[s];
|
||||||
first = true;
|
first = true;
|
||||||
evlist__for_each_entry(evlist, counter) {
|
evlist__for_each_entry(evlist, counter) {
|
||||||
if (is_duration_time(counter))
|
|
||||||
continue;
|
|
||||||
|
|
||||||
ad.val = ad.ena = ad.run = 0;
|
ad.val = ad.ena = ad.run = 0;
|
||||||
ad.nr = 0;
|
ad.nr = 0;
|
||||||
if (!collect_data(config, counter, aggr_cb, &ad))
|
if (!collect_data(config, counter, aggr_cb, &ad))
|
||||||
|
@ -848,8 +840,6 @@ static void print_no_aggr_metric(struct perf_stat_config *config,
|
||||||
if (prefix)
|
if (prefix)
|
||||||
fputs(prefix, config->output);
|
fputs(prefix, config->output);
|
||||||
evlist__for_each_entry(evlist, counter) {
|
evlist__for_each_entry(evlist, counter) {
|
||||||
if (is_duration_time(counter))
|
|
||||||
continue;
|
|
||||||
if (first) {
|
if (first) {
|
||||||
aggr_printout(config, counter, cpu, 0);
|
aggr_printout(config, counter, cpu, 0);
|
||||||
first = false;
|
first = false;
|
||||||
|
@ -906,8 +896,6 @@ static void print_metric_headers(struct perf_stat_config *config,
|
||||||
|
|
||||||
/* Print metrics headers only */
|
/* Print metrics headers only */
|
||||||
evlist__for_each_entry(evlist, counter) {
|
evlist__for_each_entry(evlist, counter) {
|
||||||
if (is_duration_time(counter))
|
|
||||||
continue;
|
|
||||||
os.evsel = counter;
|
os.evsel = counter;
|
||||||
out.ctx = &os;
|
out.ctx = &os;
|
||||||
out.print_metric = print_metric_header;
|
out.print_metric = print_metric_header;
|
||||||
|
@ -1136,15 +1124,11 @@ perf_evlist__print_counters(struct perf_evlist *evlist,
|
||||||
break;
|
break;
|
||||||
case AGGR_THREAD:
|
case AGGR_THREAD:
|
||||||
evlist__for_each_entry(evlist, counter) {
|
evlist__for_each_entry(evlist, counter) {
|
||||||
if (is_duration_time(counter))
|
|
||||||
continue;
|
|
||||||
print_aggr_thread(config, _target, counter, prefix);
|
print_aggr_thread(config, _target, counter, prefix);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case AGGR_GLOBAL:
|
case AGGR_GLOBAL:
|
||||||
evlist__for_each_entry(evlist, counter) {
|
evlist__for_each_entry(evlist, counter) {
|
||||||
if (is_duration_time(counter))
|
|
||||||
continue;
|
|
||||||
print_counter_aggr(config, counter, prefix);
|
print_counter_aggr(config, counter, prefix);
|
||||||
}
|
}
|
||||||
if (metric_only)
|
if (metric_only)
|
||||||
|
@ -1155,8 +1139,6 @@ perf_evlist__print_counters(struct perf_evlist *evlist,
|
||||||
print_no_aggr_metric(config, evlist, prefix);
|
print_no_aggr_metric(config, evlist, prefix);
|
||||||
else {
|
else {
|
||||||
evlist__for_each_entry(evlist, counter) {
|
evlist__for_each_entry(evlist, counter) {
|
||||||
if (is_duration_time(counter))
|
|
||||||
continue;
|
|
||||||
print_counter(config, counter, prefix);
|
print_counter(config, counter, prefix);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue