Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp200393pxf; Wed, 17 Mar 2021 03:10:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzBklTMqII8IyIQ+CA3KXxJ2virCivgcmbkLS+a+pQMC0CNjzIm6YK1V/kiS5cV0wQTXaVk X-Received: by 2002:a17:906:d9c9:: with SMTP id qk9mr33886429ejb.504.1615975812559; Wed, 17 Mar 2021 03:10:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615975812; cv=none; d=google.com; s=arc-20160816; b=KFbiWDnOWcDYq7BJ5rwCqK8X+Yt2VK73d9hbK25VCu0PSwd7F5yRbD+uW52UQwUmPV fsWB4MygL7mtUDg8XC6w0AsyMEaYH0bKVUFZyzXmJCwB80+nHjysI/Tpd9twZheW75Aa 7E2wlsDUz3JH+bn2SgukslFpabcQTcgbQYahelkS13VYYzoY+ndm6mkeI+Q7sZL52Swc 3pHjgxfFAV9QBdiJGO7NJKzSxu8IG5EmSYYyTEbgbdBltF8o2Wo0YgzhjEOoXg99E/Jj HTd9gKNU+O+UsOZnwNg8q6VkCVc/IVBlSM5NlMfgSwwZG/Ujq0ZC49ABUHYI9lCnqur0 YpiQ== 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=MElDg3cG/3Dz6lM5WJjnup4TWCLl29WwGaKclvjIThc=; b=aWHjWvcbD1c1nrRdLcIv8/Omy7hAeBQoW6NTaDzNniZVg2eJPbNa1UtsMsDC1KQuA7 AgiAWXCjSTzhBJ6W5r84NRWMLxF8iZjFMptc48/5B6lL7uxfy+BJOttc3AbQ0UZDWWlH LIatndwE7i5n9NoR7M7IRh5+O7ZJSJ718L7fih/GGj392r0VNPWZ3COi9SVbmL7QkexV O7pPmBBumU3ILQbr18kr1Qnz6UvPScGW02CXExpEGYKUcEsIZIc5xf8dVC755B+KvYSR DfGsadaEwwtL4PDaCg7dfQCq1PbYaVhvwDiqgpG3pUAe/X7/QrR8rFBz5Q/WfAtd0UvV jDiQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=ii9UoEW6; 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 h18si15767860eds.345.2021.03.17.03.09.50; Wed, 17 Mar 2021 03:10:12 -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=ii9UoEW6; 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 S229865AbhCQKGk (ORCPT + 99 others); Wed, 17 Mar 2021 06:06:40 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:42330 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229939AbhCQKGg (ORCPT ); Wed, 17 Mar 2021 06:06:36 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1615975596; 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=MElDg3cG/3Dz6lM5WJjnup4TWCLl29WwGaKclvjIThc=; b=ii9UoEW6bnnup2HcokSZooVvkR1OWfgl2wMJIfVQPc+98gfFLiGuAd5/kvyZ7TOzGJlf4H o826eUa30Azruff1/VzRVT4jkVcycVBtjrGzRnn6cX272VYSvleJjip6xlYCWI9/SXWLTr TMO1wBW2xq6BLqXtkuBC1QgWYkxqNL4= 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-487-ceAsTIv0MO6sCRvLL6fdSw-1; Wed, 17 Mar 2021 06:06:32 -0400 X-MC-Unique: ceAsTIv0MO6sCRvLL6fdSw-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 8DB0A107ACCD; Wed, 17 Mar 2021 10:06:30 +0000 (UTC) Received: from krava (unknown [10.40.194.149]) by smtp.corp.redhat.com (Postfix) with SMTP id 302865C261; Wed, 17 Mar 2021 10:06:27 +0000 (UTC) Date: Wed, 17 Mar 2021 11:06:27 +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> <65624432-2752-8381-d299-9b48ec508406@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <65624432-2752-8381-d299-9b48ec508406@linux.intel.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 17, 2021 at 10:12:03AM +0800, Jin, Yao wrote: > > > On 3/16/2021 10:04 PM, Jiri Olsa wrote: > > 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 > > > > Actually we have to support pmu style event for hybrid platform. > > User may want to enable the events from specified pmus and also with flexible grouping. > > For example, > > perf stat -e '{cpu_core/cycles/,cpu_core/instructions/}' -e '{cpu_atom/cycles/,cpu_atom/instructions/}' > > This usage is common and reasonable. So I think we may need to support pmu style events. sure, but we don't support 'cpu/cycles/' but we support 'cpu/cpu-cycles/' why do you insist on supporting cpu_core/cycles/ ? jirka