lkml.org 
[lkml]   [2012]   [Jul]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 09/11] perf top: error handling for counter creation should parallel perf-record
Em Fri, Jul 20, 2012 at 05:25:54PM -0600, David Ahern escreveu:
> diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c
> index e3cab5f..0ce665c 100644
> --- a/tools/perf/builtin-top.c
> +++ b/tools/perf/builtin-top.c
> @@ -943,8 +943,10 @@ try_again:
> * based cpu-clock-tick sw counter, which
> * is always available even if no PMU support:
> */
> - if (attr->type == PERF_TYPE_HARDWARE &&
> - attr->config == PERF_COUNT_HW_CPU_CYCLES) {
> + if ((err == ENOENT || err == ENXIO)
> + && attr->type == PERF_TYPE_HARDWARE
> + && attr->config == PERF_COUNT_HW_CPU_CYCLES) {
> +

usual style:

if ((err == ENOENT || err == ENXIO) &&
attr->type == PERF_TYPE_HARDWARE &&
attr->config == PERF_COUNT_HW_CPU_CYCLES) {

- Arnaldo


\
 
 \ /
  Last update: 2012-07-23 21:01    [W:0.220 / U:2.440 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site