Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp186306rwi; Thu, 13 Oct 2022 23:59:33 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4xcgIo+TF8uT9Kgxc7xsJe8poAtrOf3beSU3HsZ5z33RjRJJjI8SYForsUXA7qmm5vHEHw X-Received: by 2002:a17:907:3da5:b0:78e:793:4084 with SMTP id he37-20020a1709073da500b0078e07934084mr2554042ejc.285.1665730772895; Thu, 13 Oct 2022 23:59:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665730772; cv=none; d=google.com; s=arc-20160816; b=xfK2FTXMbDmSjvxatQVS6dUIzNWNno2p1OyVGVlxVAC7eZGIRRosuNgqHS7msLY6Iv /ipbbEiR+TcWumoKPAaRlFJXONZ51bdqj7Vx0YYiGTGpq+2aRcwnL2WzZ4Xl9gsBGMlG j/+lPaLVF11UXcHWHl5C8KJIU/Jj3oIiIPrC9zr+MijOdVNT584tl2J7Bmb23qUpxheL fAUKvDJq0qkU8ML3g+TTsadUlKzYOvtsf+EJaSN0doW6uHsuqhmhPf+mMUzyI7G+V4oB Ump+dINVw8rVCCNirAgT1s6dybp1OWDDazOiQonQ/HXEuGIeClRqH0XdD2fMKQJtL3uI MwXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from:sender :dkim-signature; bh=MiMyw7YB2EnKoani26cg+4Uepi4pmm8Ijh9bPfSD/gc=; b=FKur+K595e3i3fvbF5Ubw2nK6+a/vQREHR1Jkp6Ci+WOkuz+qz0eipRTytMrGnKpIK S4eHHXM2srWANwhEJiNnWxv94EPArkJWMJ/UX0O7HmLP38yOa6pvU6m5m1TbyHGtuzan 4QQ4iXjpbDLxVP+o8EGhRBbHXWmhUjER5qSasY4k+H6mPH7QrUolz1/eoRNVNYXGW9F9 i4ot/JES+LI/ZYuNGd6yHUF8aBwBKTfDTp0JXbcDPqy2givNYN6sVN6ld0Hesz6uqX6A xjZrtfWuboSQ/holzdZTFSUO1g4pK3EBBo/j4g9r/sL1MVgbNVGGLLVC9Oovjzp1JM0Y 35dQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=jh8JYNdH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id oz30-20020a1709077d9e00b0078e18bd3256si1848574ejc.291.2022.10.13.23.59.06; Thu, 13 Oct 2022 23:59:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=jh8JYNdH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229808AbiJNGQI (ORCPT + 99 others); Fri, 14 Oct 2022 02:16:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58150 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229722AbiJNGP6 (ORCPT ); Fri, 14 Oct 2022 02:15:58 -0400 Received: from mail-pj1-x1031.google.com (mail-pj1-x1031.google.com [IPv6:2607:f8b0:4864:20::1031]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5EBC91ACAA3; Thu, 13 Oct 2022 23:15:56 -0700 (PDT) Received: by mail-pj1-x1031.google.com with SMTP id gf8so4013412pjb.5; Thu, 13 Oct 2022 23:15:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:from:to:cc:subject:date :message-id:reply-to; bh=MiMyw7YB2EnKoani26cg+4Uepi4pmm8Ijh9bPfSD/gc=; b=jh8JYNdHA1hyHQLhEMYdwS9V0KiqddfEclbPYcqBepEodjjQVy3LAQTVD53HUFJi6m 06J/TS8+cbDSP2NvlpeEltTnfyPURKTlhgg4yVy6CQGwStSpN+dEcJFOPmFHmefchgl3 xbJn0PAq2KHPmJqETYcOlIKty650+cYw9t5rHL3643GHW+qlWX7E+fb5cfLx6HFd6e+U zAhV8O2V5qs2dT1ALEOa6krnOkP5dEAYuhhtu8oQoHj2BuolfKl0sd2geR5mqdhCHxc0 aW36hrOz3vaLPjmQiMDBksKqLa03R6Z5t248WGHjJKn1GhoMSLFuhkdFHxOoQLlJKdyR YLeQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=MiMyw7YB2EnKoani26cg+4Uepi4pmm8Ijh9bPfSD/gc=; b=oYW2k07A70PmZb9bR0y0yNkJZ+UmBnFcfNSLqoAMP+JPJPtbiJA7W4ynISdoI1UPTZ gw/Sg22pAgceJl0/hU+cgIA5APjqaoSPeaMSxRKXK4wcXvNaJ4M9B3LbiEiMDkY7yUcw KikZf970HCvCJfISqYb5WAT20oPmuIR6Gn1SoGaykU9jqfdVpdjikLAPuZSkPblUBlSW saGf0SSmxg4goad4RdgWUYrvW9+EzjZnBj3h1aIfnm5TKX4uhXNRM34vJZhJF09qEe8p CCwqub9kcTsW5dW3fmhLoobBr6lQYqh5y4xQoQHkzrherq4Nfem158PCulqSmX4pC79T pzwQ== X-Gm-Message-State: ACrzQf32rNcdv7u7BSom+u9MIAMuAAMBItosOsF84fxSJu2IQY4kq1Av k9Ud7KDn2hBOc/I02XG67Gw= X-Received: by 2002:a17:902:7102:b0:17f:3da:f18c with SMTP id a2-20020a170902710200b0017f03daf18cmr3590394pll.24.1665728155691; Thu, 13 Oct 2022 23:15:55 -0700 (PDT) Received: from balhae.hsd1.ca.comcast.net ([2601:647:6780:1040:630:195c:38a7:a411]) by smtp.gmail.com with ESMTPSA id 94-20020a17090a09e700b0020af2411721sm721942pjo.34.2022.10.13.23.15.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Oct 2022 23:15:55 -0700 (PDT) Sender: Namhyung Kim From: Namhyung Kim To: Arnaldo Carvalho de Melo , Jiri Olsa Cc: Ingo Molnar , Peter Zijlstra , LKML , Ian Rogers , Adrian Hunter , linux-perf-users@vger.kernel.org, Kan Liang , Leo Yan , Andi Kleen , Athira Rajeev , James Clark , Xing Zhengjun Subject: [PATCH 02/19] perf tools: Use pmu info in evsel__is_hybrid() Date: Thu, 13 Oct 2022 23:15:33 -0700 Message-Id: <20221014061550.463644-3-namhyung@kernel.org> X-Mailer: git-send-email 2.38.0.413.g74048e4d9e-goog In-Reply-To: <20221014061550.463644-1-namhyung@kernel.org> References: <20221014061550.463644-1-namhyung@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org If evsel has pmu, it can use pmu->is_hybrid directly. Acked-by: Ian Rogers Signed-off-by: Namhyung Kim --- tools/perf/util/evsel.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c index 196f8e4859d7..a6ea91c72659 100644 --- a/tools/perf/util/evsel.c +++ b/tools/perf/util/evsel.c @@ -3132,6 +3132,9 @@ void evsel__zero_per_pkg(struct evsel *evsel) bool evsel__is_hybrid(struct evsel *evsel) { + if (evsel->pmu) + return evsel->pmu->is_hybrid; + return evsel->pmu_name && perf_pmu__is_hybrid(evsel->pmu_name); } -- 2.38.0.413.g74048e4d9e-goog