Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp1770068imm; Wed, 6 Jun 2018 23:34:33 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLueV5M4MrMW0pA/uTiS0O4CuvXuofavwODIknCKBeAHqCUPbEAwoy+CQtlhIzJvpLq6zWC X-Received: by 2002:a17:902:b217:: with SMTP id t23-v6mr713067plr.312.1528353273000; Wed, 06 Jun 2018 23:34:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528353272; cv=none; d=google.com; s=arc-20160816; b=cdGNMEJu0iKPOi988GVsHBIPeqZVCSoq1BC0dmD91OV++F5jW+n6tL5rOLynVDSoto 9Gc+x3R4mQFDY4i4O+760MAxVcYsIpN6pAs28BNU6lSc4X9uozZ+0f/Gcx9Uquw+ru6U NMNddhPVMxhzYv2urgHGq0tgLr+yhwYt4KiDOiumW/NKJzweBAZkX+ksEFsX5eW902KJ SNwUkPkQsDyyK2tK5mKnKW/bbsclqw9xh/1CTRCODJ7SO+CG9QJz1gcfyWtSIko+8LF4 0/Y1tuAcdXXCh2njGunnpO0zzdwoQX9tIclPMTxp09WNz102xtOO+2M0cOWo/2D8/aY/ a/nw== 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=s5Vl2KqOugJp0IxAerSS2KxVMvizlH/luhvJl+HmSFs=; b=Aaicys7lrjel6DfikWyrpD4BzpqFq2Wh2qvl3JJOXQ6nbZYlJJkzp2D0odoArj4v6+ UFiU0xoSCMFjhV/N6/l9H+2UynKRcYazi8HdZzREm92T4TEb1fWSHRV9PEoNszpc4gRg tWwYCuaR5rGrz+LMUdRsT3Bp7Y7gXoSAJwNx3+pbPU+i5Jw6+ewag7WGYmk9wdM5Y3Ei ZmgFSNoDDWNkAn4IBN8RScWuqubkyhYGg7NYEVndNPdkeD/5r1tNbjqXTq6mHP8wxNDg swJpwRtfyeaktpeSUYGLI7jTjRUtUmtnKrp3/i1MJ9fCNfvpdph2MYbFkxPRI2+3hHH5 joWQ== 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 j187-v6si9828090pgc.552.2018.06.06.23.34.18; Wed, 06 Jun 2018 23:34:32 -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 S1752610AbeFGGWo (ORCPT + 99 others); Thu, 7 Jun 2018 02:22:44 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:52976 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751372AbeFGGWn (ORCPT ); Thu, 7 Jun 2018 02:22:43 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 2F8A340BC05B; Thu, 7 Jun 2018 06:22:43 +0000 (UTC) Received: from krava (unknown [10.43.17.157]) by smtp.corp.redhat.com (Postfix) with SMTP id C6BF01002957; Thu, 7 Jun 2018 06:22:40 +0000 (UTC) Date: Thu, 7 Jun 2018 08:22:39 +0200 From: Jiri Olsa To: Andi Kleen Cc: Jiri Olsa , Arnaldo Carvalho de Melo , Peter Zijlstra , Kan Liang , Agustin Vega-Frias , lkml , Ingo Molnar , Namhyung Kim , David Ahern , Alexander Shishkin , Stephane Eranian , Milian Wolff , Andi Kleen , Frederic Weisbecker Subject: Re: [PATCH 01/10] perf tools: Uniquify the event name if there's no other matched event Message-ID: <20180607062239.GA18436@krava> References: <20180606221513.11302-1-jolsa@kernel.org> <20180606221513.11302-2-jolsa@kernel.org> <20180606231902.GE7220@tassilo.jf.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180606231902.GE7220@tassilo.jf.intel.com> User-Agent: Mutt/1.9.1 (2017-09-22) X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Thu, 07 Jun 2018 06:22:43 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Thu, 07 Jun 2018 06:22:43 +0000 (UTC) for IP:'10.11.54.3' DOMAIN:'int-mx03.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 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. > > > > After: > > # perf stat -e cp/cpu-cycles/ kill > > > > Performance counter stats for 'kill': > > > > 1,573,757 cpu/cpu-cycles/ > > > The output is 100% identical? nope, the U is actualy missing.. that's the thing, the patern matching allows you to put 'cp' instead of 'cpu' and the final output is screwed.. also the metrics won't match the proper event jirka