Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1217924 > unrolled thread
| Started by | Andi Kleen <andi@firstfloor.org> |
|---|---|
| First post | 2015-09-03 01:40 +0200 |
| Last post | 2015-09-04 11:00 +0200 |
| Articles | 3 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH 8/9] perf, tools, stat: Remove extra unsupported/not counted handling Andi Kleen <andi@firstfloor.org> - 2015-09-03 01:40 +0200
Re: [PATCH 8/9] perf, tools, stat: Remove extra unsupported/not counted handling Jiri Olsa <jolsa@redhat.com> - 2015-09-04 11:00 +0200
Re: [PATCH 8/9] perf, tools, stat: Remove extra unsupported/not counted handling Jiri Olsa <jolsa@redhat.com> - 2015-09-04 11:00 +0200
| From | Andi Kleen <andi@firstfloor.org> |
|---|---|
| Date | 2015-09-03 01:40 +0200 |
| Subject | [PATCH 8/9] perf, tools, stat: Remove extra unsupported/not counted handling |
| Message-ID | <q4pNg-32i-23@gated-at.bofh.it> |
From: Andi Kleen <ak@linux.intel.com>
printout now handles unsupported/not counted printing, so we can
remove one extra instance in the aggregated printing.
Signed-off-by: Andi Kleen <ak@linux.intel.com>
---
tools/perf/builtin-stat.c | 22 ++--------------------
1 file changed, 2 insertions(+), 20 deletions(-)
diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c
index f049fa67c..68c16e6 100644
--- a/tools/perf/builtin-stat.c
+++ b/tools/perf/builtin-stat.c
@@ -841,26 +841,8 @@ static void print_counter_aggr(struct perf_evsel *counter, char *prefix)
if (prefix)
fprintf(output, "%s", prefix);
- if (scaled == -1 || !counter->supported) {
- fprintf(output, "%*s%s",
- csv_output ? 0 : 18,
- counter->supported ? CNTR_NOT_COUNTED : CNTR_NOT_SUPPORTED,
- csv_sep);
- fprintf(output, "%-*s%s",
- csv_output ? 0 : unit_width,
- counter->unit, csv_sep);
- fprintf(output, "%*s",
- csv_output ? 0 : -25,
- perf_evsel__name(counter));
-
- if (counter->cgrp)
- fprintf(output, "%s%s", csv_sep, counter->cgrp->name);
-
- print_running(avg_running, avg_enabled);
- fputc('\n', output);
- return;
- }
-
+ if (scaled == -1)
+ avg_running = avg_enabled = 0;
uval = avg * counter->scale;
printout(-1, 0, counter, uval, prefix, avg_running, avg_enabled, avg);
fprintf(output, "\n");
--
2.4.3
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Jiri Olsa <jolsa@redhat.com> |
|---|---|
| Date | 2015-09-04 11:00 +0200 |
| Subject | Re: [PATCH 8/9] perf, tools, stat: Remove extra unsupported/not counted handling |
| Message-ID | <q4V0K-5zg-1@gated-at.bofh.it> |
| In reply to | #1217924 |
On Wed, Sep 02, 2015 at 04:35:53PM -0700, Andi Kleen wrote:
> From: Andi Kleen <ak@linux.intel.com>
>
> printout now handles unsupported/not counted printing, so we can
> remove one extra instance in the aggregated printing.
>
> Signed-off-by: Andi Kleen <ak@linux.intel.com>
> ---
> tools/perf/builtin-stat.c | 22 ++--------------------
> 1 file changed, 2 insertions(+), 20 deletions(-)
>
> diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c
> index f049fa67c..68c16e6 100644
> --- a/tools/perf/builtin-stat.c
> +++ b/tools/perf/builtin-stat.c
> @@ -841,26 +841,8 @@ static void print_counter_aggr(struct perf_evsel *counter, char *prefix)
> if (prefix)
> fprintf(output, "%s", prefix);
>
> - if (scaled == -1 || !counter->supported) {
> - fprintf(output, "%*s%s",
> - csv_output ? 0 : 18,
> - counter->supported ? CNTR_NOT_COUNTED : CNTR_NOT_SUPPORTED,
> - csv_sep);
> - fprintf(output, "%-*s%s",
> - csv_output ? 0 : unit_width,
> - counter->unit, csv_sep);
> - fprintf(output, "%*s",
> - csv_output ? 0 : -25,
> - perf_evsel__name(counter));
> -
> - if (counter->cgrp)
> - fprintf(output, "%s%s", csv_sep, counter->cgrp->name);
> -
> - print_running(avg_running, avg_enabled);
> - fputc('\n', output);
> - return;
> - }
why is this not part of the:
perf, tools, stat: Move non counting counter printing to printout
jirka
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Jiri Olsa <jolsa@redhat.com> |
|---|---|
| Date | 2015-09-04 11:00 +0200 |
| Subject | Re: [PATCH 8/9] perf, tools, stat: Remove extra unsupported/not counted handling |
| Message-ID | <q4V0L-5zg-35@gated-at.bofh.it> |
| In reply to | #1217924 |
On Wed, Sep 02, 2015 at 04:35:53PM -0700, Andi Kleen wrote:
> From: Andi Kleen <ak@linux.intel.com>
>
> printout now handles unsupported/not counted printing, so we can
> remove one extra instance in the aggregated printing.
>
> Signed-off-by: Andi Kleen <ak@linux.intel.com>
> ---
> tools/perf/builtin-stat.c | 22 ++--------------------
> 1 file changed, 2 insertions(+), 20 deletions(-)
>
> diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c
> index f049fa67c..68c16e6 100644
> --- a/tools/perf/builtin-stat.c
> +++ b/tools/perf/builtin-stat.c
> @@ -841,26 +841,8 @@ static void print_counter_aggr(struct perf_evsel *counter, char *prefix)
> if (prefix)
> fprintf(output, "%s", prefix);
>
> - if (scaled == -1 || !counter->supported) {
> - fprintf(output, "%*s%s",
> - csv_output ? 0 : 18,
> - counter->supported ? CNTR_NOT_COUNTED : CNTR_NOT_SUPPORTED,
> - csv_sep);
> - fprintf(output, "%-*s%s",
> - csv_output ? 0 : unit_width,
> - counter->unit, csv_sep);
> - fprintf(output, "%*s",
> - csv_output ? 0 : -25,
> - perf_evsel__name(counter));
> -
> - if (counter->cgrp)
> - fprintf(output, "%s%s", csv_sep, counter->cgrp->name);
> -
> - print_running(avg_running, avg_enabled);
> - fputc('\n', output);
> - return;
> - }
> -
> + if (scaled == -1)
> + avg_running = avg_enabled = 0;
why the extra initialization?
jirka
> uval = avg * counter->scale;
> printout(-1, 0, counter, uval, prefix, avg_running, avg_enabled, avg);
> fprintf(output, "\n");
> --
> 2.4.3
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web