Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp274748rwi; Sun, 9 Oct 2022 23:20:58 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5vABdreMnrm39npsZlFD2OBLvhOHDTc6JUirp1Dcue15KC5RRAbzJdXaaIwlqYyGoaMm12 X-Received: by 2002:a17:907:7241:b0:78c:9371:4d72 with SMTP id ds1-20020a170907724100b0078c93714d72mr13769457ejc.205.1665382858219; Sun, 09 Oct 2022 23:20:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665382858; cv=none; d=google.com; s=arc-20160816; b=r1csWAinRITbq+3e/HyrO3xvSZ2nr83hMg6N7TahYxkdXHF00zkjnfq10X14VQEkvm V7aWpfi+pw0Wirxk9VS3ydFpU0FheVSwXwOdun+Rv8hdn1jGHI6kQf/RqWC1hWoUnaIa xRYMgVcCXZMKyEFw4mYfYd7J5vU7mHlHyMLsoAWKTZdIlR41tLnmHryk49nwWh6g/v34 hl6KHtVNdp3R85degwKt0CHGyDpdxWsKVOIEGfZCeHB1iyY0uEQHx6kEC+we+JS5IGME H3I4rWibMTaaJXoCPyeq1wMgnRYoJaYiAjXCcwoXKL8Jl5eCwMpL3h5oyW02HC5o7ejP CFoA== 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=dMQ9Nr134jTsiGubldmik2SSGo5GiaQNz3NaNpTchwQ=; b=teQwWxNwi0U1eFSKQLqFFeIBIgZ+X4szXREw9Bzy78JtGC0CbBGULescDHKx3H7mbH whPi1jt3vsAywfIx1e8DugIcvntBL0X5rdSQ+VcUSjTg3bYPhK4OS0rbrsiULQ34A6hK jLgZ+Kdi3frCMf4wd6FepvKzuVTFAwaLchhj/ZNyq6WtUuIbH0Bi40r90xPx1eeTY25Z 2Gm2CN4N7EzcxO9EGKl8D09L6E2Mb7yRZr2Ugl0nVEi/LILvFbrkrm5805sHeHUWeXh6 AuuMpbkbaje5YEhEJ0BMWXEBMzrcxVz2E13lrrGEQkSQg6w2ZMqxhMrmeOi//ytRVCYq 3V8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=VRkFyJlB; 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 dn2-20020a17090794c200b007823d2b20fdsi11156572ejc.219.2022.10.09.23.20.31; Sun, 09 Oct 2022 23:20:58 -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=VRkFyJlB; 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 S231310AbiJJFgP (ORCPT + 99 others); Mon, 10 Oct 2022 01:36:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54248 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231173AbiJJFgH (ORCPT ); Mon, 10 Oct 2022 01:36:07 -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 95A23DEE9; Sun, 9 Oct 2022 22:36:06 -0700 (PDT) Received: by mail-pj1-x1031.google.com with SMTP id gf8so8965460pjb.5; Sun, 09 Oct 2022 22:36:06 -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=dMQ9Nr134jTsiGubldmik2SSGo5GiaQNz3NaNpTchwQ=; b=VRkFyJlBI5IZ1Et9MvJK2iqInmhfh7AoF/MlT7QEroFzWtAnIqRwqxkUZoW2ixzOIz ZDMrrTmBF9kJRdPlIP3v3ictLW7oqdkX6VQdbRpy9pKXwesfzzMR1FTmESuLUdneEya7 16+FhT4SBVCwLQV6hlHvSBEKqG7MXjyTZFQT5c88DzXt6dNSKwV/xnNWLtj2wvzVTwyu Ko6Ua6HQ54aITfo53Um8aUfw/svAUro1MTXO/OMgTG39yBXxC6jhnDDmmYozMUTO9Lp2 wzr3BO9t9QruOoLHp5HW/Pkc6/HBV3kNMhTGid/N14IlHVhsSn+/kClLiSAvPB9UUcde 04+Q== 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=dMQ9Nr134jTsiGubldmik2SSGo5GiaQNz3NaNpTchwQ=; b=O9F7g13DJ4afVvdGyfRBCQPenh+m1DhoU5JW/Un75qcPU6K9YVlmnyJTZdaEZfhmyJ GcOO7MTUCxylziYanj6dpGe4k2qrc/QYWFBcpwRNnDRoIqcu5zUNAClg7VRt8eTN2qbx 4SsiJuf5LmVWR2gwsAok0jXQAKLnTc3eJnQ2DVxyEspN6E8xFCsWO41bGZZzKMR6C+Qo VpajHHaHCzTUVKTFyPdwcyA8u+3dlbK/5KV+7NZauTnToHxqaT7b3r5C0owKYwfVa87f 09Fb6GKZ9g2Hcwswi++SNAAoASI2boUBvpDtd87jICKXNMFF/zX40QPjCQO1tPEfVItI ccsw== X-Gm-Message-State: ACrzQf28VjVEKm+r/2f3fm+WaTWwsHADYxfIfhTXHumGY8bwW/QPZWME iZcNpH4YPTdnZpHufLu62Y4Om159CVk= X-Received: by 2002:a17:902:e88b:b0:17f:8514:cf5f with SMTP id w11-20020a170902e88b00b0017f8514cf5fmr17599210plg.163.1665380166013; Sun, 09 Oct 2022 22:36:06 -0700 (PDT) Received: from balhae.hsd1.ca.comcast.net ([2601:647:6780:1040:862f:cd0e:bf30:6d69]) by smtp.gmail.com with ESMTPSA id u13-20020a170902e80d00b0017f7e0f4a4esm5667594plg.35.2022.10.09.22.36.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 09 Oct 2022 22:36:05 -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: Sun, 9 Oct 2022 22:35:43 -0700 Message-Id: <20221010053600.272854-3-namhyung@kernel.org> X-Mailer: git-send-email 2.38.0.rc1.362.ged0d419d3c-goog In-Reply-To: <20221010053600.272854-1-namhyung@kernel.org> References: <20221010053600.272854-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. 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.rc1.362.ged0d419d3c-goog