lkml.org 
[lkml]   [2017]   [Sep]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] perf, tools: Improve error messages for missing PMUs
Em Mon, Sep 11, 2017 at 05:26:36PM -0700, Andi Kleen escreveu:
> From: Andi Kleen <ak@linux.intel.com>
>
> When a PMU is missing print a better error message mentioning
> the missing PMU.
>
> % mkdir empty
> % mount --bind empty /sys/devices/msr
> % perf stat -M Summary true
> event syntax error: '{inst_retired.any,cycles}:W,{cpu_clk_unhalted.thread}:W,{inst_retired.any}:W,{cpu_clk_unhalted.ref_tsc,msr/tsc/}:W,{fp_comp_ops_exe.sse_scalar..'
> \___ Cannot find PMU `msr'. Missing kernel support?
>
> It still cannot find the right column for aliases, but it's already a vast improvement.

CC /tmp/build/perf/util/parse-events.o
util/parse-events.c: In function ‘__parse_events_add_pmu’:
util/parse-events.c:1227:3: error: ignoring return value of ‘asprintf’, declared with attribute warn_unused_result [-Werror=unused-result]
(void)asprintf(&err->str,
^~~~~~~~~~~~~~~~~~~~~~~~~
"Cannot find PMU `%s'. Missing kernel support?",
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
name);
~~~~~
cc1: all warnings being treated as errors
mv: cannot stat '/tmp/build/perf/util/.parse-events.o.tmp': No such file or directory
make[4]: *** [/home/acme/git/linux/tools/build/Makefile.build:95: /tmp/build/perf/util/parse-events.o] Error 1
make[3]: *** [/home/acme/git/linux/tools/build/Makefile.build:138: util] Error 2
make[2]: *** [Makefile.perf:595: /tmp/build/perf/libperf-in.o] Error 2
make[1]: *** [Makefile.perf:210: sub-make] Error 2
make: *** [Makefile:109: install-bin] Error 2
make: Leaving directory '/home/acme/git/linux/tools/perf'

\
 
 \ /
  Last update: 2017-09-13 15:34    [W:0.030 / U:5.252 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site