From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756426AbbJVIGj (ORCPT ); Thu, 22 Oct 2015 04:06:39 -0400 Received: from szxga02-in.huawei.com ([119.145.14.65]:49612 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751153AbbJVIGf (ORCPT ); Thu, 22 Oct 2015 04:06:35 -0400 Message-ID: <5628976B.8030207@huawei.com> Date: Thu, 22 Oct 2015 15:59:39 +0800 From: "Wangnan (F)" User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Namhyung Kim CC: Arnaldo Carvalho de Melo , Alexei Starovoitov , Brendan Gregg , Peter Zijlstra , Daniel Borkmann , David Ahern , He Kuang , Jiri Olsa , Li Zefan , Masami Hiramatsu , Paul Mackerras , "linux-kernel@vger.kernel.org" , pi3orama , xiakaixu 00238161 , "Arnaldo Carvalho de Melo" Subject: Re: [PATCH 26/31] perf tools: Support perf event alias name References: <1444826502-49291-1-git-send-email-wangnan0@huawei.com> <1444826502-49291-27-git-send-email-wangnan0@huawei.com> <20151021085353.GJ628@sejong> <56278C5E.2060208@huawei.com> <5628904C.2040608@huawei.com> In-Reply-To: Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.111.66.109] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2015/10/22 15:53, Namhyung Kim wrote: > On Thu, Oct 22, 2015 at 4:29 PM, Wangnan (F) wrote: >> [SNIP] >>> I understand the need of using aliases but I think it's more natural >>> to use event name for simple cases.. >> >> I will consider this. However, if we allow using event name directly like >> this: >> >> # perf record -e cycles -e test_pmu.c/myevent=cycles/ ... >> >> Then two '-e' seems redundant, right? Why not directly using: >> >> # perf record -e test_pmu.c/myevent=cycles/ ... >> >> and make perf creates cycles event for test_pmu.c? >> >> We can make syntax like >> >> # perf record -e test_pmu.c/myevent=cycles/ ... >> >> as a syntax sugar of >> >> # perf record -e randomname=cycles -e test_pmu.c/myevent=randomname/ ... >> >> and don't need to find evsel through their names if alias not exist. >> >> So this is a new feature, and worth another patch. >> >> Thought? > Not sure it's worth. It can confuse users IMHO. > > Isn't it enough to give them in a single argument? > > # perf record -e cycles,test_pmu.c/myevent=cycles/ OK. I have put it on my todo-list. Thank you. > Thanks, > Namhyung