From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752823AbcBLN5c (ORCPT ); Fri, 12 Feb 2016 08:57:32 -0500 Received: from m12-15.163.com ([220.181.12.15]:41645 "EHLO m12-15.163.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752446AbcBLN5a convert rfc822-to-8bit (ORCPT ); Fri, 12 Feb 2016 08:57:30 -0500 Content-Type: text/plain; charset=gb2312 Mime-Version: 1.0 (1.0) Subject: Re: [PATCH 12/54] perf tools: Enable config raw and numeric events From: pi3orama X-Mailer: iPhone Mail (13D15) In-Reply-To: <20160212135245.GE16190@krava.redhat.com> Date: Fri, 12 Feb 2016 21:56:10 +0800 Cc: Wang Nan , Alexei Starovoitov , Arnaldo Carvalho de Melo , Arnaldo Carvalho de Melo , Brendan Gregg , Adrian Hunter , Cody P Schafer , "David S. Miller" , He Kuang , =?GB2312?Q?J=A8=A6r=A8=A6mie_Galarneau?= , Jiri Olsa , Kirill Smelkov , Li Zefan , Masami Hiramatsu , Namhyung Kim , Peter Zijlstra , linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8BIT Message-Id: <95763B3E-B1AF-42B2-B82F-0217C060DAAD@163.com> References: <1454680939-24963-1-git-send-email-wangnan0@huawei.com> <1454680939-24963-13-git-send-email-wangnan0@huawei.com> <20160212135245.GE16190@krava.redhat.com> To: Jiri Olsa X-CM-TRANSID: D8CowEDJtUZ55L1WlumcAA--.19722S2 X-Coremail-Antispam: 1Uf129KBjvJXoW7Ww4xKryDXFWfJr4DJF15twb_yoW5Jry8pr 1kCasxKayxJrWI9wsIv348Z34xJ3s3W398KFs8Xr1Yvw18Jr1UXF4xK3y5WFW5ur1UXwn0 va4agryxKry5AaDanT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x07jIJP_UUUUU= X-Originating-IP: [118.125.191.235] X-CM-SenderInfo: lslt02xdpdqiywtou0bp/1tbiyRwNQFQG187fOAAAs0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 发自我的 iPhone > 在 2016年2月12日,下午9:52,Jiri Olsa 写道: > >> On Fri, Feb 05, 2016 at 02:01:37PM +0000, Wang Nan wrote: >> This patch allows setting config terms for raw and numeric events. >> For example: >> >> # perf stat -e cycles/name=cyc/ ls >> ... >> 1821108 cyc >> ... >> >> # perf stat -e r6530160/name=event/ ls >> ... >> 1103195 event >> ... >> >> # perf record -e cycles -e 4:0x6530160/name=evtx,call-graph=fp/ -a sleep 1 >> ... >> # perf report --stdio >> ... >> # Samples: 124 of event 'cycles' >> 46.61% 0.00% swapper [kernel.vmlinux] [k] cpu_startup_entry >> 41.26% 0.00% swapper [kernel.vmlinux] [k] start_secondary >> ... >> # Samples: 91 of event 'evtx' >> ... >> 93.76% 0.00% swapper [kernel.vmlinux] [k] cpu_startup_entry >> | >> ---cpu_startup_entry >> | >> |--66.63%--call_cpuidle >> | cpuidle_enter >> | | > > > got compile error: > Have you cleaned those generated .c files from .y and .l? Most of compiling errors related to yacc and lex would gone after removing them by make clean or by hand. Thank you. > > [jolsa@krava perf]$ make JOBS=1 > BUILD: Doing 'make -j1' parallel build > BISON util/parse-events-bison.c > util/parse-events.y:436.23-38: error: symbol opt_event_config is used, but is not defined as a token and has no rules > PE_VALUE ':' PE_VALUE opt_event_config > ^^^^^^^^^^^^^^^^ > util/parse-events.y:442.68-69: error: $4 of ‘event_legacy_numeric’ has no declared type > ABORT_ON(parse_events_add_numeric(data, list, (u32)$1, $3, $4)); > ^^ > util/parse-events.y:443.34-35: error: $4 of ‘event_legacy_numeric’ has no declared type > parse_events__free_terms($4); > ^^ > util/parse-events.y:454.74-75: error: $2 of ‘event_legacy_raw’ has no declared type > ABORT_ON(parse_events_add_numeric(data, list, PERF_TYPE_RAW, $1, $2)); > ^^ > util/parse-events.y:455.34-35: error: $2 of ‘event_legacy_raw’ has no declared type > parse_events__free_terms($2); > ^^ > util/Build:122: recipe for target 'util/parse-events-bison.c' failed > make[3]: *** [util/parse-events-bison.c] Error 1 > /home/jolsa/kernel/linux-perf/tools/build/Makefile.build:116: recipe for target 'util' failed > make[2]: *** [util] Error 2 > Makefile.perf:434: recipe for target 'libperf-in.o' failed > make[1]: *** [libperf-in.o] Error 2 > Makefile:68: recipe for target 'all' failed > make: *** [all] Error 2 > > > jirka