]> Git Repo - linux.git/commit
perf tools: Fail on using multiple bits long terms without value
authorJiri Olsa <[email protected]>
Fri, 17 Feb 2017 14:00:56 +0000 (15:00 +0100)
committerArnaldo Carvalho de Melo <[email protected]>
Fri, 17 Feb 2017 20:28:22 +0000 (17:28 -0300)
commit99e7138eb7897aa0ccc6661173ae2d7e79721e05
tree6d603e00226f5a25356c0315827701ea6bc96ff8
parent67b49b38f7bd6f34319b540ce824d5697241b3a8
perf tools: Fail on using multiple bits long terms without value

Currently we allow not to specify value for numeric terms and we set
them to value 1. This was originaly meant just for single bit terms to
allow user to type:

  $ perf record -e 'cpu/cpu-cycles,any'

instead of:

  $ perf record -e 'cpu/cpu-cycles,any=1'

However it works also for multi bits terms like:

  $ perf record -e 'cpu/event/' ls
  ...
  $ perf evlist -v
  ..., config: 0x1, ...

After discussion with Peter we decided making such term usage to fail,
like:

  $ perf record -e 'cpu/event/' ls
  event syntax error: 'cpu/event/'
                       \___ no value assigned for term
  ...

Signed-off-by: Jiri Olsa <[email protected]>
Cc: David Ahern <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
tools/perf/util/parse-events.c
tools/perf/util/parse-events.h
tools/perf/util/parse-events.y
tools/perf/util/pmu.c
This page took 0.051785 seconds and 4 git commands to generate.