Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp458700pxf; Thu, 18 Mar 2021 04:54:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyi191Ixsd9PhufXIEdftyYzssSIO4XGxBWPGxrcwX3O8UUYEnuqztPaNRlloG2bfd6CFGT X-Received: by 2002:a17:906:1453:: with SMTP id q19mr41038473ejc.76.1616068490820; Thu, 18 Mar 2021 04:54:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616068490; cv=none; d=google.com; s=arc-20160816; b=zWfE2p0J/o4BKojfcd2cDgfUijLxdUMefHm4gt+c70E712fehobxxtTiNuX93BniZW fLiyPFxKP1RbUbVLBWPr3sxjE0+Gm+RiRlpCGbh8PLPxUvbovwu68qQIRmIOOjfGKkNW j1ApRw19LKKwRPWH6SZjKBZcdoRnpcGnfwZMQ1HA33hzT+UbXxzY7kGqvhFDt38WwtGB oIeGjpJ8Gc23nJVEWULwCaH/Oc3KW5SPOUZok5qQic3C7ocQh2N2+j+0UXTyB/HA2Tf3 nIZChhD8z00FLuocolZ7sB2t0Kvs5fc4mX7sValwVpkHcvjGFCDXNC0ynXxQqHJdZyKF 1KNw== 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=90h+1E2sAdBMnvKo/W6WXH2g+bl3xXKAkJKNk3akQ2I=; b=yZ9eMq3/o+5F6V5QrhphdmQbgMvyJkeRRqgRLlguN/aMAW3/f+YbRLOdYJB1HUOKKp sEwX47+SqzS6PPOK3AjFeIQ6xtP6J71ivMEXQ3+e0LzS7MN5H71ND/EZXXgTzTIWmL27 BQxRofYBFdzfjY7YxoQAOKYQl5CV9lWBtH3EHDklaoqkNzwaTT8aIaKCfowmc2b6r9/E a38MMu4v4wD6ZdjqZbwK9r0vw7gG1O/MlK1ADobC9HvZxqvlwsAIDyn97DrAYduOukv0 YrMAc3AH+fiorP4rnpiNIM01J7CWcEf192om4Ys4gydqpC5YOVY4HsWfx4iZW2b9ciX1 1+ZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="F/TlgpeN"; 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 ko24si1493057ejc.407.2021.03.18.04.54.28; Thu, 18 Mar 2021 04:54:50 -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="F/TlgpeN"; 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 S229974AbhCRLx0 (ORCPT + 99 others); Thu, 18 Mar 2021 07:53:26 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:48418 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230087AbhCRLw5 (ORCPT ); Thu, 18 Mar 2021 07:52:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1616068377; 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=90h+1E2sAdBMnvKo/W6WXH2g+bl3xXKAkJKNk3akQ2I=; b=F/TlgpeNfq+GeSDbXEiuimD1xXz0Z1oo8YZ9CDgTjdBvPv9FvWgUbqaskFU3gmLdqYJ8Yk a0PZvzSxg7ew0FxFT28UT+2bpGB/Q/tkCHsEOGZh+PMZ2Z7EBrbCYrVHsz5dvRihMOeZmA b+H2AhpHjOhYoJ1vSY1R1KmLvDGfNi4= 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-133-N_SZlK5YPkm4XrNfj80Tww-1; Thu, 18 Mar 2021 07:52:53 -0400 X-MC-Unique: N_SZlK5YPkm4XrNfj80Tww-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id B8A2961180; Thu, 18 Mar 2021 11:52:51 +0000 (UTC) Received: from krava (unknown [10.40.194.6]) by smtp.corp.redhat.com (Postfix) with SMTP id 0506118A50; Thu, 18 Mar 2021 11:52:48 +0000 (UTC) Date: Thu, 18 Mar 2021 12:52:48 +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 16/27] perf evlist: Warn as events from different hybrid PMUs in a group Message-ID: References: <20210311070742.9318-1-yao.jin@linux.intel.com> <20210311070742.9318-17-yao.jin@linux.intel.com> <020eaabf-abdb-4458-a883-2abbd4bbfbbd@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <020eaabf-abdb-4458-a883-2abbd4bbfbbd@linux.intel.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 16, 2021 at 01:25:29PM +0800, Jin, Yao wrote: > Hi Jiri, > > On 3/16/2021 7:03 AM, Jiri Olsa wrote: > > On Thu, Mar 11, 2021 at 03:07:31PM +0800, Jin Yao wrote: > > > > SNIP > > > > > goto try_again; > > > } > > > + > > > + if (errno == EINVAL && perf_pmu__hybrid_exist()) > > > + evlist__warn_hybrid_group(evlist); > > > rc = -errno; > > > evsel__open_strerror(pos, &opts->target, errno, msg, sizeof(msg)); > > > ui__error("%s\n", msg); > > > diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c > > > index 7a732508b2b4..6f780a039db0 100644 > > > --- a/tools/perf/builtin-stat.c > > > +++ b/tools/perf/builtin-stat.c > > > @@ -239,6 +239,9 @@ static void evlist__check_cpu_maps(struct evlist *evlist) > > > struct evsel *evsel, *pos, *leader; > > > char buf[1024]; > > > + if (evlist__hybrid_exist(evlist)) > > > + return; > > > > this should be in separate patch and explained > > > > Now I have another idea. If a group consists of atom events and core events, > we still follow current disabling group solution? > > I mean removing following code: > > if (evlist__hybrid_exist(evlist)) > return; > > evlist__check_cpu_maps then continues running and disabling the group. But > also report with a warning that says "WARNING: Group has events from > different hybrid PMUs". > > Do you like this way? I'm not sure I follow completely.. would be best over the code jirka