Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp4266837pxf; Tue, 16 Mar 2021 09:19:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy9teDbNuKZBUFJ8bB8OXZGTQNJjIXnohdyC8OTBCpEeon9b5hcc+CSDZ3ktKOMOb0ZkAQ7 X-Received: by 2002:a17:906:37db:: with SMTP id o27mr31086459ejc.60.1615911540778; Tue, 16 Mar 2021 09:19:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615911540; cv=none; d=google.com; s=arc-20160816; b=y2N5oJXJWo/P/pZx9wXc3a1yTpF+7ukqRzbEDZMPCGZL63BSeD+5x20eI+IfGSoy2J oVQ4FsQ22aKFi5tLI7TKVbukSfSzG0LxBwhI3GMkyCm5w36Qj8QXKuCKrk1YZyrLznyn +fP9aeEAqlssQoHZftrr8rtPjGo1LrP0OxSBjEhaIUfJXETQzVfGHpc1V0SPjJDXPKLH +R/8TzGcJgST2CR7FCBSBYp0EfaLGIKYRWy09HUmpQSZ7vcaOGLkhW2lUR4zLF320Ajp jlRmPDOiluBqk4z6DWZp0Z+oBlxab12Pq8Fg/oNj4n7dkz52K6vYl8ynqkMrneK/z4QL Lvcg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=lZNEQWnU1MKUmFvt5yn1z/1Cxme6xTcqchzQaFGYGPg=; b=RtjwqrcxBni647nPVo96l++nNaWSWMQe4zaWNbeaoLldHIB2ISozOaRJbV1ks20EvO PCe+Ao1VNXQ8RpVE+/PTRnIq+ARUNUSQC4OVNVkJWQjU7GplkeyWeiJANa34evEDaO2J +TbB+OQHy7Nh3TDcmSCM9DOi1Kp39OtNDv1yQyuMOMgCjORP/vl8EKNDaZmdXgmu968m 0PpEaDbIWBL5RFDoXo3ZjC1UYUFpnSBnFaWPqwmzUlqTGN2wn+2jh0u5r4dGplfDzieX sYllc4j9ryKpilR6O2D0Pg0Ia9FiG3KNACMF+vMpEv9mokWO3CAxJDBu7wTssInQxQsT Ujgw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=KFm7mFyC; 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 gv19si13582941ejc.109.2021.03.16.09.18.37; Tue, 16 Mar 2021 09:19:00 -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=KFm7mFyC; 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 S235812AbhCPOEb (ORCPT + 99 others); Tue, 16 Mar 2021 10:04:31 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:44552 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235403AbhCPOER (ORCPT ); Tue, 16 Mar 2021 10:04:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1615903456; 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=lZNEQWnU1MKUmFvt5yn1z/1Cxme6xTcqchzQaFGYGPg=; b=KFm7mFyCM+Zwd+7uOiukQr79O7gMrthNwakUngbmFTyL93PnfPmxPLGQlFPfwzPXhuDw/X ppu307YXu7vxFwxutgd97VeLbynFyZEvInz7xmyCTD+taoJGBAYHvQ2gxFnhbDcbnq+dDv 1LcblOYiXzMoMRu9mGaKfsNDKXwAcUA= 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-8-BaZQag2UOUek8MRyCKd6vw-1; Tue, 16 Mar 2021 10:04:12 -0400 X-MC-Unique: BaZQag2UOUek8MRyCKd6vw-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 2A90492508; Tue, 16 Mar 2021 14:04:10 +0000 (UTC) Received: from krava (unknown [10.40.193.217]) by smtp.corp.redhat.com (Postfix) with SMTP id 028715D9D3; Tue, 16 Mar 2021 14:04:07 +0000 (UTC) Date: Tue, 16 Mar 2021 15:04:07 +0100 From: Jiri Olsa To: "Jin, Yao" Cc: acme@kernel.org, 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 Subject: Re: [PATCH v2 11/27] perf parse-events: Support hardware events inside PMU Message-ID: References: <20210311070742.9318-1-yao.jin@linux.intel.com> <20210311070742.9318-12-yao.jin@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 16, 2021 at 09:49:42AM +0800, Jin, Yao wrote: SNIP > > Performance counter stats for 'system wide': > > 136,655,302 cpu_core/branch-instructions/ > > 1.003171561 seconds time elapsed > > So we need special rules for both cycles and branches. > > The worse thing is, we also need to process the hardware cache events. > > # ./perf stat -e cpu_core/LLC-loads/ > event syntax error: 'cpu_core/LLC-loads/' > \___ unknown term 'LLC-loads' for pmu 'cpu_core' > > valid terms: event,pc,edge,offcore_rsp,ldlat,inv,umask,frontend,cmask,config,config1,config2,name,period,percore > > Initial error: > event syntax error: 'cpu_core/LLC-loads/' > \___ unknown term 'LLC-loads' for pmu 'cpu_core' > > If we use special rules for establishing all event mapping, that looks too much. :( hmmm but wait, currently we do not support events like this: 'cpu/cycles/' 'cpu/branches/' the pmu style accepts only 'events' or 'format' terms within // we made hw events like 'cycles','instructions','branches' special to be used without the pmu so why do we need to support cpu_code/cycles/ ? jirka