Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp128323pxf; Wed, 10 Mar 2021 23:12:17 -0800 (PST) X-Google-Smtp-Source: ABdhPJyusv8Ovk/1Qk3bMj3HabZ34lnWrtlVReHx1PPDBxM7NnzTqX83SlccDd82JsH11STPhB91 X-Received: by 2002:a17:906:2e45:: with SMTP id r5mr1651678eji.380.1615446736937; Wed, 10 Mar 2021 23:12:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615446736; cv=none; d=google.com; s=arc-20160816; b=00ofAFxZwBEP152GX7IvmzjOYONVnShh/bloZyxqds85a1hHE0/jqyP4ETRc5Pd9IE Bfddsf3/T1+NXBwG9991AhbgJp8UPnVnCBGCUtEZ9KH/SEqiYxviML9NhF+87r0o1Vle KDClzl1F6FtXxUMv8tY8EEUkoroVY1sg/REDS7aF2W9awXAk5mTOj5xdNkZ0TSbvL7+B ZlE4lLmSyAEomDFyr1Epqr9W1vEJwkJ0pwgCzG9sLjiw9kqERCsJUo6430a9lsigPs9y 1i9csN7vEHhCSt7acxWqlIMf4/ohtf1kC4zIb1VfJvOWW7HVx3s/HvnRXM9AUIDgMNvB YRgA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from:ironport-sdr:ironport-sdr; bh=sopqcDiCN+SNC0XgRRQOGopKVLpmolslHXixoTwSL1g=; b=zSEskNmWnRZSkES3H+KTxfLI38LUGEmuYwkDoP5QLAngzKSTn8PAeIJSJtWYPvUa2D iaHfkPRvP+8S5wXdnPe598QnB/umiZQYFW3IalvGrZP12YEpoSIBOSpnzd+eHpNUMmve VmI4tSsAreMVZjS2ZwEHbDSiMKyu7JReQQtiEeIEYOYHpeDM+vqP7K7jWUcdbmxAdV+a +2k0cR1lZBENI62xhc7weFsFOBurd6dilfEkLvnM27uwdAvAdemQHeP9DBYgk5iq+vGz CH0wZaIRx3/3Mk3MheFZwtIRWjFmsOeLhxbu7tK80W8ro9v71ptEXnjZ1yCUnBoZrBMn f9rA== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dp18si1215280ejc.432.2021.03.10.23.11.53; Wed, 10 Mar 2021 23:12:16 -0800 (PST) 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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231913AbhCKHJe (ORCPT + 99 others); Thu, 11 Mar 2021 02:09:34 -0500 Received: from mga04.intel.com ([192.55.52.120]:22599 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231773AbhCKHJD (ORCPT ); Thu, 11 Mar 2021 02:09:03 -0500 IronPort-SDR: Jys/C1uJ3e159cb3fDQpDrA48rCuVvP1KE2DWbuZzCKH+raD+YCZkFgLYw6O5Y9wNlkniOIQUo LU/Xk3AhEddw== X-IronPort-AV: E=McAfee;i="6000,8403,9919"; a="186246094" X-IronPort-AV: E=Sophos;i="5.81,239,1610438400"; d="scan'208";a="186246094" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Mar 2021 23:09:03 -0800 IronPort-SDR: 9FmbNPRPv+yIHyOVEyP42V+KbSDAHOx7MzfZm+w5tlLwHS5/ccuL2dw3U3rFUiH57lFne+q9TP vlZjIkIQGdLA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.81,239,1610438400"; d="scan'208";a="509937977" Received: from kbl-ppc.sh.intel.com ([10.239.159.163]) by fmsmga001.fm.intel.com with ESMTP; 10 Mar 2021 23:09:00 -0800 From: Jin Yao To: acme@kernel.org, jolsa@kernel.org, peterz@infradead.org, mingo@redhat.com, alexander.shishkin@linux.intel.com Cc: Linux-kernel@vger.kernel.org, ak@linux.intel.com, kan.liang@intel.com, yao.jin@intel.com, Jin Yao Subject: [PATCH v2 18/27] perf script: Support PERF_TYPE_HARDWARE_PMU and PERF_TYPE_HW_CACHE_PMU Date: Thu, 11 Mar 2021 15:07:33 +0800 Message-Id: <20210311070742.9318-19-yao.jin@linux.intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210311070742.9318-1-yao.jin@linux.intel.com> References: <20210311070742.9318-1-yao.jin@linux.intel.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org For a hybrid system, the perf subsystem doesn't know which PMU the events belong to. So the PMU aware version PERF_TYPE_HARDWARE_PMU and PERF_TYPE_HW_CACHE_PMU are introduced. Now define the new output[] entries for these two types. Signed-off-by: Jin Yao --- tools/perf/builtin-script.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c index 5915f19cee55..d0e889e636d5 100644 --- a/tools/perf/builtin-script.c +++ b/tools/perf/builtin-script.c @@ -275,6 +275,30 @@ static struct { .invalid_fields = PERF_OUTPUT_TRACE | PERF_OUTPUT_BPF_OUTPUT, }, + [PERF_TYPE_HARDWARE_PMU] = { + .user_set = false, + + .fields = PERF_OUTPUT_COMM | PERF_OUTPUT_TID | + PERF_OUTPUT_CPU | PERF_OUTPUT_TIME | + PERF_OUTPUT_EVNAME | PERF_OUTPUT_IP | + PERF_OUTPUT_SYM | PERF_OUTPUT_SYMOFFSET | + PERF_OUTPUT_DSO | PERF_OUTPUT_PERIOD, + + .invalid_fields = PERF_OUTPUT_TRACE | PERF_OUTPUT_BPF_OUTPUT, + }, + + [PERF_TYPE_HW_CACHE_PMU] = { + .user_set = false, + + .fields = PERF_OUTPUT_COMM | PERF_OUTPUT_TID | + PERF_OUTPUT_CPU | PERF_OUTPUT_TIME | + PERF_OUTPUT_EVNAME | PERF_OUTPUT_IP | + PERF_OUTPUT_SYM | PERF_OUTPUT_SYMOFFSET | + PERF_OUTPUT_DSO | PERF_OUTPUT_PERIOD, + + .invalid_fields = PERF_OUTPUT_TRACE | PERF_OUTPUT_BPF_OUTPUT, + }, + [OUTPUT_TYPE_SYNTH] = { .user_set = false, -- 2.17.1