From patchwork Thu Jan 23 16:07:27 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Clark X-Patchwork-Id: 11348573 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 94086139A for ; Thu, 23 Jan 2020 16:08:31 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 63AEB21835 for ; Thu, 23 Jan 2020 16:08:31 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="nfdQpQUa" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 63AEB21835 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=H4fElbSfpWdjmCiQvlan/PUX3NrN61fSFLH1OCxAlE8=; b=nfdQpQUagTX3is 9bC28PRmt/HGHBXHVf4bTlvYpsr/aoYV3guhnCQ7o8vtE9vGPCtcnw7ahx5swsLPeyrjTfSVSIvMx TLfCdjZYpzHY/nswBUR7IQ4nf+EkizfzOHSe/Pjv5FrFL8IZhqKyMt7yhzh4ExuWQcOSzJnKdYKWD p2tSF+tOsYJwnL8DeyOoplNhflE8lbhy7tC3r26Gexp21egJxPNoqfOAJOkoBPT6PSQsezcFvWR4T eRJ5oh+TeqILeUGDVPdlVV+IWjLLmbqTralMWYX4/XoGVfvWR4hybVAP+DGfe/F0UZYx4IGEfYLVU XlLxVhun8YZGMXXJz2LA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iuf1v-0005sk-2w; Thu, 23 Jan 2020 16:08:27 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iuf1d-0005ge-Nm for linux-arm-kernel@lists.infradead.org; Thu, 23 Jan 2020 16:08:11 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 487961FB; Thu, 23 Jan 2020 08:08:01 -0800 (PST) Received: from e112479-lin.arm.com (unknown [10.37.9.147]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 5EA113F68E; Thu, 23 Jan 2020 08:07:56 -0800 (PST) From: James Clark To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 0/7] perf tools: Add support for some spe events and precise ip Date: Thu, 23 Jan 2020 16:07:27 +0000 Message-Id: <20200123160734.3775-1-james.clark@arm.com> X-Mailer: git-send-email 2.25.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200123_080809_857447_A1EE7C28 X-CRM114-Status: GOOD ( 12.25 ) X-Spam-Score: -0.7 (/) X-Spam-Report: SpamAssassin version 3.4.3 on bombadil.infradead.org summary: Content analysis details: (-0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [217.140.110.172 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , Al Grant , wxf.wang@hisilicon.com, Peter Zijlstra , Will Deacon , Jiri Olsa , suzuki.poulose@arm.com, Arnaldo Carvalho de Melo , gengdongjiu@huawei.com, linux-perf-users@vger.kernel.org, Alexander Shishkin , Ingo Molnar , liuqi115@hisilicon.com, James Clark , huawei.libin@huawei.com, Namhyung Kim , nd@arm.com, liwei391@huawei.com, Tan Xiaojun Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org After the commit ffd3d18c20b8 ("perf tools: Add ARM Statistical Profiling Extensions (SPE) support") was merged, "perf record" and "perf report --dump-raw-trace" are supported. However, the raw data that is dumped cannot be used without parsing. This patchset is to improve the "perf report" support for SPE, and further process the data. Currently, support for the three events of llc-miss, tlb-miss, branch-miss and remote-access is added. The macro definition was modified under Jeremy's suggestion, and the "event:pp" approach was used under James' suggestion to achieve the precise ip of some events on arm64. Currently, only branch-misses are implemented, and other event support will be added later. In addition, we also found that when recording large multi-threaded programs, ctrl + c could not end recording, so it was fixed and two patches were added. Cc: Will Deacon Cc: Mark Rutland Cc: Peter Zijlstra Cc: Ingo Molnar Cc: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Tan Xiaojun Cc: Al Grant Cc: Namhyung Kim James Clark (1): perf tools: Unset precise_ip when using SPE Tan Xiaojun (4): perf tools: Move arm-spe-pkt-decoder.h/c to the new dir perf tools: Add support for "report" for some spe events perf report: Add --spe options for arm-spe perf tools: Support "branch-misses:pp" on arm64 Wei Li (2): perf tools: add perf_evlist__terminate() for terminate perf tools: arm-spe: fix record hang after being terminated tools/perf/Documentation/perf-report.txt | 10 + tools/perf/arch/arm64/util/arm-spe.c | 10 +- tools/perf/builtin-record.c | 1 + tools/perf/builtin-report.c | 5 + tools/perf/util/Build | 2 +- tools/perf/util/arm-spe-decoder/Build | 1 + .../util/arm-spe-decoder/arm-spe-decoder.c | 225 +++++ .../util/arm-spe-decoder/arm-spe-decoder.h | 66 ++ .../arm-spe-pkt-decoder.c | 0 .../arm-spe-pkt-decoder.h | 2 + tools/perf/util/arm-spe.c | 789 +++++++++++++++++- tools/perf/util/arm-spe.h | 3 + tools/perf/util/auxtrace.c | 49 ++ tools/perf/util/auxtrace.h | 29 + tools/perf/util/evlist.c | 16 + tools/perf/util/evlist.h | 1 + tools/perf/util/evsel.h | 1 + tools/perf/util/session.h | 2 + 18 files changed, 1170 insertions(+), 42 deletions(-) create mode 100644 tools/perf/util/arm-spe-decoder/Build create mode 100644 tools/perf/util/arm-spe-decoder/arm-spe-decoder.c create mode 100644 tools/perf/util/arm-spe-decoder/arm-spe-decoder.h rename tools/perf/util/{ => arm-spe-decoder}/arm-spe-pkt-decoder.c (100%) rename tools/perf/util/{ => arm-spe-decoder}/arm-spe-pkt-decoder.h (96%)