Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp219327imm; Thu, 7 Jun 2018 17:09:38 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJm7MwVlh9RC8MzVp6ewPvRV/fosd6ojjzoDGLvi82pn9uzeSbOaLkhltDEyY18QYx6FlFp X-Received: by 2002:a17:902:981:: with SMTP id 1-v6mr4087273pln.11.1528416578407; Thu, 07 Jun 2018 17:09:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528416578; cv=none; d=google.com; s=arc-20160816; b=y3+JXpksINJPZEO7F6EVo/eqrPYBL+4zK4H1RAGgCrC8EO3q/JBywP9OLHYlkAh3Fa mpP03M76TJasFa5CCZn/WmhWAW6Ij+iO/kLtx2OV/eLVqNv2OCnWytJtHsUvFy4sAkTk vsBCXGtoI0yQkBVav0gZXJy2H8JNCbwP+HDj3joC1Lp2aaxdVQNP6lELVga8Bf/x49Hy WoUNIXQ7hjaqzzxq269mH4S6ofZ7XGbpdWZ8Hy3s+wbBP8qBg4uYTUT3+KoEBcEQQZQd WDmwwEArtp29whXl8QxwclQwcxoW0OMiyp9mx+I+UCgkkI4NNEXV/VHSBnQLAvegWOve uRxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=AQm/NBP5pjA6o3OqmXRlYBGHIOROWTp2xbNYma2knVA=; b=HxPOg2ZvKgFO45ZU1hzKewyS5ArSpMe4vZyXk1feHxiNQYoiwuJF2XOefSbNVpJu+e wyE0k7bzgejQG4Ghm/JNv7WBQozMYHXbqaDzWbPCC7vFPOXZhEYbI/3EcJ9CgGjF7w+o D4W50sZWPNe65Ny/fmBLRuL12DRmtmrBEnsBsky4MZrILHfU5mqGSP4XwFck9YU1xf7A rJzoMk1n+SBnw5mKsscaBiMiI0Dxj4XbBVkoETn9LgIGVexfr7+E2XJUzQqW12byJTzE w4Trqz471LbrmYV6vt5lMtM5+fB2ylkB/30MX/R72yZ/5Qyg0t49Z2slqNhmcIFR/B3I Nucw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f4-v6si12758646pgc.522.2018.06.07.17.09.24; Thu, 07 Jun 2018 17:09:38 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752428AbeFHAHD (ORCPT + 99 others); Thu, 7 Jun 2018 20:07:03 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:55440 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752411AbeFHAHC (ORCPT ); Thu, 7 Jun 2018 20:07:02 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 39F8F400E9BA; Fri, 8 Jun 2018 00:07:02 +0000 (UTC) Received: from krava (ovpn-204-19.brq.redhat.com [10.40.204.19]) by smtp.corp.redhat.com (Postfix) with SMTP id B1B581C668; Fri, 8 Jun 2018 00:06:57 +0000 (UTC) Date: Fri, 8 Jun 2018 02:06:56 +0200 From: Jiri Olsa To: Stephane Eranian Cc: Andi Kleen , Jiri Olsa , Arnaldo Carvalho de Melo , Peter Zijlstra , "Liang, Kan" , agustinv@codeaurora.org, LKML , Ingo Molnar , Namhyung Kim , David Ahern , Alexander Shishkin , Milian Wolff , Andi Kleen , frederic@kernel.org Subject: Re: [PATCH 01/10] perf tools: Uniquify the event name if there's no other matched event Message-ID: <20180608000656.GA12322@krava> References: <20180606221513.11302-1-jolsa@kernel.org> <20180606221513.11302-2-jolsa@kernel.org> <20180606231902.GE7220@tassilo.jf.intel.com> <20180607062239.GA18436@krava> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.1 (2017-09-22) X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Fri, 08 Jun 2018 00:07:02 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Fri, 08 Jun 2018 00:07:02 +0000 (UTC) for IP:'10.11.54.5' DOMAIN:'int-mx05.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'jolsa@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 07, 2018 at 09:09:10AM -0700, Stephane Eranian wrote: > On Wed, Jun 6, 2018 at 11:22 PM Jiri Olsa wrote: > > > > On Wed, Jun 06, 2018 at 04:19:02PM -0700, Andi Kleen wrote: > > > On Thu, Jun 07, 2018 at 12:15:04AM +0200, Jiri Olsa wrote: > > > > Currently by default we try to match the user specified PMU > > > > name to all PMU units available and use them to aggregate > > > > all matched PMUs event counts into one 'pattern' event. > > > > > > > > While this is useful for uncore events, it screws up names > > > > for other events, where this is not desirable, like: > > > > > > > > Before: > > > > # perf stat -e cp/cpu-cycles/ kill > > > > > > I assume you mean cpU/cpu-cycles/ > > > > > > > > Performance counter stats for 'kill': > > > > > > > > 1,573,757 cp/cpu-cycles/ > > > > > > > > Keeping the pattern matching logic, but making the name unique > > > > in case there's no other match found. That fixes the example > > > > above and hopefully does not screw up anything else. > > > > > And the problem I have with this approach, is that you do not really > know what you are measuring. > You have not way of knowing that the count comes from multiple PMU instances: > > perf stat -a -e uncore_cb/clockticks/ kill > 0 uncore_cb/clockticks/ > > I think you need to report that this is aggregated from uncore_cbox_0 > and uncore_cbox_1. > Otherwise it is not clear what I am monitoring. And you hope that what > you match in the regex > is related. > In my example should say: > 0 uncore_cbox[0-1]/clockticks/ ok, makes sense.. also shouldnt be that hard to do.. will repost thanks, jirka