> [root@jouet ~]# perf stat -e 
> topdown-total-slots:u,cpu/event=topdown-total-slots/u usleep 1
> event syntax error: 'topdown-total-slots:u,cpu/event=topdown-total-slots/u'
>                             \___ parser error
> Run 'perf list' for a list of valid events
> 
>  Usage: perf stat [<options>] [<command>]
> 
>     -e, --event <event>   event selector. use 'perf list' to list available 
> events
> [root@jouet ~]#
> 
> that it fails, Jiri, probably something obvious to you? :-)

Works for me here

./perf stat -e topdown-total-slots:u,cpu/event=topdown-total-slots/u sleep 1

 Performance counter stats for 'sleep 1':

           515,204      topdown-total-slots:u                                   
    
           514,712      cpu/event=topdown-total-slots/u                         
          

       1.001438114 seconds time elapsed


Did you perhaps miss this hunk?

--- a/tools/perf/util/parse-events.l
+++ b/tools/perf/util/parse-events.l
@@ -259,6 +259,7 @@ cycles-ct                                   { return 
str(yyscanner, PE_KERNEL_PMU_EVENT); }
 cycles-t                                       { return str(yyscanner, 
PE_KERNEL_PMU_EVENT); }
 mem-loads                                      { return str(yyscanner, 
PE_KERNEL_PMU_EVENT); }
 mem-stores                                     { return str(yyscanner, 
PE_KERNEL_PMU_EVENT); }
+topdown-[a-z-]+                                        { return str(yyscanner, 
PE_KERN

-Andi
-- 
a...@linux.intel.com -- Speaking for myself only

Reply via email to