Commit a6f39cec authored by Sandipan Das's avatar Sandipan Das Committed by Arnaldo Carvalho de Melo

perf tests: Fix complex event name parsing

The 'umask' event parameter is unsupported on some architectures like

This can be observed on a powerpc64le system running Fedora 27 as shown

  # perf test "Parse event definition strings" -v
   6: Parse event definition strings                        :
  --- start ---
  test child forked, pid 45915
  running test 3 'cpu/name='COMPLEX_CYCLES_NAME:orig=cycles,desc=chip-clock-ticks',period=0x1,event=0x2,umask=0x3/ukp'Invalid event/parameter 'umask'
  Invalid event/parameter 'umask'
  failed to parse event 'cpu/name='COMPLEX_CYCLES_NAME:orig=cycles,desc=chip-clock-ticks',period=0x1,event=0x2,umask=0x3/ukp', err 1, str 'unknown term'
  event syntax error: '..,event=0x2,umask=0x3/ukp'
                                    \___ unknown term

  valid terms: event,mark,pmc,cache_sel,pmcxsel,unit,thresh_stop,thresh_start,combine,thresh_sel,thresh_cmp,sample_mode,config,config1,config2,name,period,freq,branch_type,time,call-graph,stack-size,no-inherit,inherit,max-stack,no-overwrite,overwrite,driver-config

  mem_access -> cpu/event=0x10401e0/
  running test 0 'config=10,config1,config2=3,umask=1'
  test child finished with 1
  ---- end ----
  Parse event definition strings: FAILED!

Committer testing:

After applying the patch these test passes and in verbose mode we get:

  # perf test -v "event definition"
   6: Parse event definition strings:
  --- start ---
  test child forked, pid 11061
  running test 0 'syscalls:sys_enter_openat'Using CPUID GenuineIntel-6-9E
  running test 53 'cycles/name='COMPLEX_CYCLES_NAME:orig=cycles,desc=chip-clock-ticks'/Duk'
  running test 0 'cpu/config=10,config1,config2=3,period=1000/u'
  running test 1 'cpu/config=1,name=krava/u,cpu/config=2/u'
  running test 2 'cpu/config=1,call-graph=fp,time,period=100000/,cpu/config=2,call-graph=no,time=0,period=2000/'
  running test 3 'cpu/name='COMPLEX_CYCLES_NAME:orig=cycles,desc=chip-clock-ticks',period=0x1,event=0x2/ukp'
  test child finished with 0
  ---- end ----
  Parse event definition strings: Ok
Suggested-by: default avatarRavi Bangoria <>
Signed-off-by: default avatarSandipan Das <>
Tested-by: default avatarArnaldo Carvalho de Melo <>
Cc: Alexey Budankov <>
Cc: Jiri Olsa <>
Cc: Naveen N. Rao <>
Fixes: 06dc5bf2 ("perf tests: Check that complex event name is parsed correctly")
Link: default avatarArnaldo Carvalho de Melo <>
parent 95035c5e
......@@ -1690,7 +1690,7 @@ static struct evlist_test test__events_pmu[] = {
.id = 2,
.name = "cpu/name='COMPLEX_CYCLES_NAME:orig=cycles,desc=chip-clock-ticks',period=0x1,event=0x2,umask=0x3/ukp",
.name = "cpu/name='COMPLEX_CYCLES_NAME:orig=cycles,desc=chip-clock-ticks',period=0x1,event=0x2/ukp",
.check = test__checkevent_complex_name,
.id = 3,
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment