Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp2983480ybt; Mon, 29 Jun 2020 12:06:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwUz6DiPys2ykNWNP77Hyniar4SPE/b6MZ0FmHuMuOpc5Ad1TJKUFDNBml9l5cI0eeXKEUm X-Received: by 2002:a05:6402:158d:: with SMTP id c13mr19531941edv.103.1593457587231; Mon, 29 Jun 2020 12:06:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593457587; cv=none; d=google.com; s=arc-20160816; b=T2MYGBNpBpyL6Ugeg+mJ++MtxkMzwIQLmvbofNae/Al8xGYa6UQm/QFA2anf9Xh3tT R49PwvLv+RSM4gTsSVFNzBOzfoQ5AUaunKs9aCyrJGBq1nYjWVlUgD/KWgF+v0OzAgwb OUo7h5/A60GMeMMSI+L77WDID/P39DHoAYXLct46SkVZtFrV0o5hp4hcbcGfJslEzWTg oR5Wodfwgm38wXf8Tbf9ejTQkNhrQ/J8vIuQ/Hqe0oLGkvQs4NmxVEONERYEW3PUbK4B 6euAoau+JmfA7DVkrXSRyoOxsauwKqhIyLDC4uXY/zRna5JLSIqXCna1IEtHkPB37FOr gjfQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date:dkim-signature; bh=FWDtF1fQ/mXJTKG1mwwIfkBgzU8jxhcN0FwqgicX+To=; b=IMTI6/4K+L1ug6x5gkJye37wJhtilPgzUyiGN6WriG53xbUVHMFnwEs5cM3S7qbj1V AYrVwjs/MEppLCRqQ+JFSgCNvGmNcqNoANp0vYKPxZ1MhFDksO1+/088g/5TfGUg89zD cnP4s3gjPcp+82+jG4DfWPmno6xcyyTlk+RXw6n0iOWCnwOq5w/CbS/2v/fnY7duxBxB QqCzSfFtIfS3dP0zA+4Idv9KAxHM5J3FMjOLe9XPx2oNT82tS8SiUArNa87c+7iJlZa3 j+wENpOXHTLxMbs0hZgaue7QBUBXvztu3Ga1WiLw6+ZIEnEL7dMR40vMlE42C2WeYY7S mraQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="M/jvES4G"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d4si268166edo.16.2020.06.29.12.06.03; Mon, 29 Jun 2020 12:06:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="M/jvES4G"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730625AbgF2TEB (ORCPT + 99 others); Mon, 29 Jun 2020 15:04:01 -0400 Received: from us-smtp-1.mimecast.com ([205.139.110.61]:34729 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730618AbgF2TDz (ORCPT ); Mon, 29 Jun 2020 15:03:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1593457433; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=FWDtF1fQ/mXJTKG1mwwIfkBgzU8jxhcN0FwqgicX+To=; b=M/jvES4G3CoUZJddXdRBmRJ0jT5g9ZJs0WmaPGVizDc/+bgoJWeAZ9lYLBuJ1zD5kvxRKo 9E3t1zAnj0wNYWuwlBPrDZrE5IgR5rmsqimHVdD2LCdV+puzf/HCeVJJUH89wbyIdgT+2J jeif31mEmTPbTDTJH7iwhDPg6QmXX7g= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-84-lK8K4gwJN_moy10V8QBKFw-1; Mon, 29 Jun 2020 08:02:23 -0400 X-MC-Unique: lK8K4gwJN_moy10V8QBKFw-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 0C07480401D; Mon, 29 Jun 2020 12:02:21 +0000 (UTC) Received: from Diego (unknown [10.40.208.71]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 96CFC7CAC5; Mon, 29 Jun 2020 12:02:17 +0000 (UTC) Date: Mon, 29 Jun 2020 14:02:04 +0200 (CEST) From: Michael Petlan X-X-Sender: Michael@Diego To: Andi Kleen cc: Ian Rogers , Jiri Olsa , Arnaldo Carvalho de Melo , lkml , Ingo Molnar , Namhyung Kim , Alexander Shishkin , Peter Zijlstra , Kajol Jain , John Garry , "Paul A. Clarke" , Stephane Eranian Subject: Re: [RFC 00/10] perf tools: Add support to reuse metric In-Reply-To: <20200626215759.GG818054@tassilo.jf.intel.com> Message-ID: References: <20200626194720.2915044-1-jolsa@kernel.org> <20200626212522.GF818054@tassilo.jf.intel.com> <20200626215759.GG818054@tassilo.jf.intel.com> User-Agent: Alpine 2.20 (LRH 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 26 Jun 2020, Andi Kleen wrote: > > The name could be a metric or an event, the logic for each is quite > > I would say collisions are unlikely. Event names follow quite structured > patterns. But across various architectures? I guess event names can be arbitrary. In perftool-testsuite, I use the following regexp to match event names: [\w\-\:\/_=,]+ > > > different. You could look up an event and when it fails assume it was > > a metric, but I like the simplicity of this approach. > > I don't think it's simpler for the user. > I think it should be clear at the user level whether they're using an event or a metric (basically a couple of events together). I don't hiding too much of details from users is any good. > > Maybe this > > change could be adopted more widely with something like "perf stat -e > > metric:IPC -a -I 1000" rather than the current "perf stat -M IPC -a -I > > 1000". > > I thought about just adding metrics to -e, without metric: of course. > > -Andi > >