From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751722AbdLYC5w (ORCPT ); Sun, 24 Dec 2017 21:57:52 -0500 Received: from mga09.intel.com ([134.134.136.24]:42829 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751039AbdLYC5v (ORCPT ); Sun, 24 Dec 2017 21:57:51 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.45,453,1508828400"; d="scan'208";a="16345826" Subject: Re: [PATCH] perf tool: Return all events as auto-completions after comma To: Arnaldo Carvalho de Melo Cc: jolsa@kernel.org, peterz@infradead.org, mingo@redhat.com, alexander.shishkin@linux.intel.com, Linux-kernel@vger.kernel.org, ak@linux.intel.com, kan.liang@intel.com, yao.jin@intel.com References: <1513940255-16528-1-git-send-email-yao.jin@linux.intel.com> <20171222121427.GQ21971@kernel.org> From: "Jin, Yao" Message-ID: <6ecfe925-19c6-163a-8c37-03e57c839882@linux.intel.com> Date: Mon, 25 Dec 2017 10:57:48 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <20171222121427.GQ21971@kernel.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > One other thing you may want to look at: > > $ $ perf record -e cycles/ > > Should present the modifiers, i.e. these: > > /* > * Update according to parse-events.l > */ > static const char *config_term_names[__PARSE_EVENTS__TERM_TYPE_NR] = { > [PARSE_EVENTS__TERM_TYPE_USER] = "", > [PARSE_EVENTS__TERM_TYPE_CONFIG] = "config", > [PARSE_EVENTS__TERM_TYPE_CONFIG1] = "config1", > [PARSE_EVENTS__TERM_TYPE_CONFIG2] = "config2", > [PARSE_EVENTS__TERM_TYPE_NAME] = "name", > [PARSE_EVENTS__TERM_TYPE_SAMPLE_PERIOD] = "period", > [PARSE_EVENTS__TERM_TYPE_SAMPLE_FREQ] = "freq", > [PARSE_EVENTS__TERM_TYPE_BRANCH_SAMPLE_TYPE] = "branch_type", > [PARSE_EVENTS__TERM_TYPE_TIME] = "time", > [PARSE_EVENTS__TERM_TYPE_CALLGRAPH] = "call-graph", > [PARSE_EVENTS__TERM_TYPE_STACKSIZE] = "stack-size", > [PARSE_EVENTS__TERM_TYPE_NOINHERIT] = "no-inherit", > [PARSE_EVENTS__TERM_TYPE_INHERIT] = "inherit", > [PARSE_EVENTS__TERM_TYPE_MAX_STACK] = "max-stack", > [PARSE_EVENTS__TERM_TYPE_OVERWRITE] = "overwrite", > [PARSE_EVENTS__TERM_TYPE_NOOVERWRITE] = "no-overwrite", > [PARSE_EVENTS__TERM_TYPE_DRV_CFG] = "driver-config", > }; > > :-) > > - Arnaldo > Hi Arnaldo, Currently, in my understanding, the modifiers appended to an event are: u/k/h/I/G/H/p/... For example, perf stat -e cycles:u Does perf support the modifiers like "cycles/config" or "cycles/config1", or ..., "cycles/driver-config" now? I tried some command lines but they were failed. Maybe my used format was not correct. Or do you mean the format like "cpu/xxx"? For example, perf stat -e cpu/event=0x0e,umask=0x1,inv/ -a sleep 1 Anyway, if we want to implement the auto-completion for the modifiers, it'd better expose them by an interface (e.g. perf list --xx) rather than hardcode them in auto-completion script. That's my initial idea. Thanks Jin Yao