From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752212AbcFFPJ7 (ORCPT ); Mon, 6 Jun 2016 11:09:59 -0400 Received: from mail.kernel.org ([198.145.29.136]:55263 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750789AbcFFPJ5 (ORCPT ); Mon, 6 Jun 2016 11:09:57 -0400 Date: Mon, 6 Jun 2016 12:09:45 -0300 From: Arnaldo Carvalho de Melo To: Arnaldo Carvalho de Melo Cc: Andi Kleen , linux-kernel@vger.kernel.org, jolsa@kernel.org, Andi Kleen Subject: Re: [PATCH] perf test: Ignore .scale and other special files Message-ID: <20160606150945.GE31477@kernel.org> References: <1465223766-29902-1-git-send-email-andi@firstfloor.org> <20160606145148.GC31477@kernel.org> <20160606145458.GD31477@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160606145458.GD31477@kernel.org> X-Url: http://acmel.wordpress.com User-Agent: Mutt/1.6.1 (2016-04-27) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Mon, Jun 06, 2016 at 11:54:58AM -0300, Arnaldo Carvalho de Melo escreveu: > Em Mon, Jun 06, 2016 at 11:51:48AM -0300, Arnaldo Carvalho de Melo escreveu: > > But this gets us to the following error: > > > > [root@jouet ~]# perf test -v 5 2>&1 | tail > > running test 49 'r1234/name=rawpmu/' > > running test 50 '4:0x6530160/name=numpmu/' > > running test 51 'L1-dcache-misses/name=cachepmu/' > > 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/' > > failed to parse event 'topdown-total-slots:u,cpu/event=topdown-total-slots/u', err 1 > > test child finished with 1 > > ---- end ---- > > parse events tests: FAILED! > > [root@jouet ~]# cat /sys/devices/cpu/events/topdown-total-slots > > event=0x3c,umask=0x0,any=1[root@jouet ~]# > > [root@jouet ~]# > > [root@jouet ~]# cat /sys/devices/cpu/events/bus-cycles > > event=0x3c,umask=0x01 > > [root@jouet ~]# > > > > I.e seems to be bickering about a missing newline in the sysfs entry, will check the parser... > > Maybe something else, as there are other files there without the newline > and the code introducing the topdown events doesn't look to be > problematic in this regard... [root@jouet ~]# perf stat -e cpu/topdown-total-slots/ usleep 1 Performance counter stats for 'usleep 1': 1,756,310 cpu/topdown-total-slots/ 0.000797426 seconds time elapsed [root@jouet ~]# perf stat -e cpu/topdown-total-slots/u usleep 1 Performance counter stats for 'usleep 1': 606,770 cpu/topdown-total-slots/u 0.000728467 seconds time elapsed [root@jouet ~]# perf stat -e cpu/event=topdown-total-slots/u usleep 1 Performance counter stats for 'usleep 1': 639,170 cpu/event=topdown-total-slots/u 0.000797547 seconds time elapsed [root@jouet ~]# Both work, i.e. unrestricted wrt kernel/user, user only (/u suffix), like in the test, it is just when we try: [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 [] [] -e, --event event selector. use 'perf list' to list available events [root@jouet ~]# that it fails, Jiri, probably something obvious to you? :-) - Arnaldo