Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 257030
b: refs/heads/master
c: 2cee77c
h: refs/heads/master
v: v3
  • Loading branch information
David Ahern authored and Arnaldo Carvalho de Melo committed Jun 2, 2011
1 parent 820465c commit 0c29bb8
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 64348153c63b8c1f99f19f14a9c3cbd5df70c9d3
refs/heads/master: 2cee77c4505fc581f41b44e18ffc0953b67a414c
9 changes: 7 additions & 2 deletions trunk/tools/perf/builtin-stat.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@
#include <locale.h>

#define DEFAULT_SEPARATOR " "
#define CNTR_NOT_SUPPORTED "<not supported>"
#define CNTR_NOT_COUNTED "<not counted>"

static struct perf_event_attr default_attrs[] = {

Expand Down Expand Up @@ -448,6 +450,7 @@ static int run_perf_stat(int argc __used, const char **argv)
if (verbose)
ui__warning("%s event is not supported by the kernel.\n",
event_name(counter));
counter->supported = false;
continue;
}

Expand All @@ -466,6 +469,7 @@ static int run_perf_stat(int argc __used, const char **argv)
die("Not all events could be opened.\n");
return -1;
}
counter->supported = true;
}

if (perf_evlist__set_filters(evsel_list)) {
Expand Down Expand Up @@ -861,7 +865,7 @@ static void print_counter_aggr(struct perf_evsel *counter)
if (scaled == -1) {
fprintf(stderr, "%*s%s%*s",
csv_output ? 0 : 18,
"<not counted>",
counter->supported ? CNTR_NOT_COUNTED : CNTR_NOT_SUPPORTED,
csv_sep,
csv_output ? 0 : -24,
event_name(counter));
Expand Down Expand Up @@ -914,7 +918,8 @@ static void print_counter(struct perf_evsel *counter)
csv_output ? 0 : -4,
evsel_list->cpus->map[cpu], csv_sep,
csv_output ? 0 : 18,
"<not counted>", csv_sep,
counter->supported ? CNTR_NOT_COUNTED : CNTR_NOT_SUPPORTED,
csv_sep,
csv_output ? 0 : -24,
event_name(counter));

Expand Down
1 change: 1 addition & 0 deletions trunk/tools/perf/util/evsel.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ struct perf_evsel {
off_t id_offset;
};
struct cgroup_sel *cgrp;
bool supported;
};

struct cpu_map;
Expand Down

0 comments on commit 0c29bb8

Please sign in to comment.