From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758165Ab3AQBDh (ORCPT ); Wed, 16 Jan 2013 20:03:37 -0500 Received: from LGEMRELSE6Q.lge.com ([156.147.1.121]:57164 "EHLO LGEMRELSE6Q.lge.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755928Ab3AQBDg (ORCPT ); Wed, 16 Jan 2013 20:03:36 -0500 X-AuditID: 9c930179-b7b54ae000000e44-60-50f74de5dfc7 From: Namhyung Kim To: Ulrich Drepper Cc: Jiri Olsa , Linux Kernel Mailing List , Arnaldo Carvalho de Melo , Corey Ashford , Frederic Weisbecker , Ingo Molnar , Paul Mackerras , Peter Zijlstra , Andi Kleen , David Ahern Subject: Re: [RFC 0/4] perf tool: Adding ratios support References: <1358257194-8204-1-git-send-email-jolsa@redhat.com> <20130116142549.GD1042@krava.brq.redhat.com> Date: Thu, 17 Jan 2013 10:03:32 +0900 In-Reply-To: (Ulrich Drepper's message of "Wed, 16 Jan 2013 10:12:14 -0500") Message-ID: <87pq14lixn.fsf@sejong.aot.lge.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Brightmail-Tracker: AAAAAA== Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On Wed, 16 Jan 2013 10:12:14 -0500, Ulrich Drepper wrote: > On Wed, Jan 16, 2013 at 9:25 AM, Jiri Olsa wrote: >> I was thinking having config files (global and arch specific) >> comming with perf having predefined formulas. > > All the more reason to not mention the file name or really any source > for the definition of the formula in the name, > > >> 1) -e 'ratio/branch-rate/' # special event class >> 2) -e 'ratio-branch-rate' # 'ratio-' prefix >> 3) -e cpu/branch-rate/ # handled like aliases, ratio name would need to be unique >> ... ? > > I think 3 is the most extensible. Perhaps use the syntax used in > other places. We have these :u suffixes etc. Perhaps have :r or :R > or whatever. I don't think it's a good idea. The ':r' syntax is for modifiers to the existing events so it doesn't match to this case IMHO. I prefer a special event class like 1 since it's possible to include non-cpu events to a ratio/formular. In that case, using 'cpu' in the PMU name can be misleading. > > Given the other comments, we might want to avoid right away "ratio". > If the mechanism is generalized it could be used to express "counter1 > - counter2" for events which cannot be expressed with a single counter > but are not really ratios. Agreed. Looks like "formular" is better. Thanks, Namhyung