Received: by 10.223.148.5 with SMTP id 5csp6142891wrq; Wed, 17 Jan 2018 09:58:00 -0800 (PST) X-Google-Smtp-Source: ACJfBousQQbyWm7bPUGRbV/UvuBbse4f5tEA5JbcpOZkLwiwgXJi+PnUMG3lyBrlFlEkcDGk3ybx X-Received: by 10.84.179.131 with SMTP id b3mr27455929plc.240.1516211880861; Wed, 17 Jan 2018 09:58:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516211880; cv=none; d=google.com; s=arc-20160816; b=FfzF8hcNTmptkmevXNd8Twy7DbHRfw51YXpt8cUQR3Q69hxQ6rrvqi6UQO+40atee8 TluIdok5tLAvJhmpS8BRyrbhjbXcbTTuOSRBDZ05DkvbFmUmB0BWaYeytDutFOcG+QZt GyTMn/imIhGBlnhjNGhYUe4Z2p+AZfiv/ZQcGEDkR6D425NabZWFRBUJnffC8vfmgn1B 7u9509QmJB75b9531bJkMz2AoQF/+QEsoYmmXT4T6TZaNrmzkX3dOzN5KbWGCy3eSJjO k+kE4gweEwmfdzs52+gDBqgnbLx+PXIWhKpkuUTUuetBK+l9OzlUks0lxwBAYgexA3nK VO6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=Jq0PkgOtTAOyb+y0EqAIo5kkpzsjsZA5cjHlZvezEwo=; b=KLp3cm2jeXVuANC+zwyCbhJC3WDurWVGhFIZDMKKkowA43HaAK1kUUtOuBKaV4+4KQ ZifouYJ7uxJTRFBHhgHfp2lhlgclzN9ePqUaot8Of6lv4VFOIJsAt5CaXAhkUjSNigJC RYj98ZJexM9p0UBb6asF9vQRYBh+qX77+u8F8xcrtVY33ravQG1BVLYCukW7qBFnYGWT HNV8EXd4pfgUybWuEMAcqEfA1EsS+OkxcsW9L+lE5c+JOjXlzMaLZWLHYkCiU+V6AoPn 26Ny9C2TR+Svubi+V3qp8TbPM4Q8e++da3jOvdDKjnrrhcvHrhR54XIb5HjrDgMzBTwl GAFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=WTTwcidx; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o19si4317670pgn.126.2018.01.17.09.57.46; Wed, 17 Jan 2018 09:58:00 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=WTTwcidx; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754260AbeAQRwY (ORCPT + 99 others); Wed, 17 Jan 2018 12:52:24 -0500 Received: from mail-it0-f66.google.com ([209.85.214.66]:44436 "EHLO mail-it0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753926AbeAQRwX (ORCPT ); Wed, 17 Jan 2018 12:52:23 -0500 Received: by mail-it0-f66.google.com with SMTP id b5so10208834itc.3 for ; Wed, 17 Jan 2018 09:52:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=Jq0PkgOtTAOyb+y0EqAIo5kkpzsjsZA5cjHlZvezEwo=; b=WTTwcidxoom6IXerXzin6LEXjJaLvPHpMWpBz3meEmooXr1NNrYD2DRHnyxdSbVAyI WAenGF5A9xqWXlTIPZ0cbTL5GnUGrHh7aU2DzLj1BQ2ANE7qHV97pL7Ckm9XwDudJVs8 upnxe+y1eU3OhUDh7sWLAv+3MjPLkz7kWdInw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=Jq0PkgOtTAOyb+y0EqAIo5kkpzsjsZA5cjHlZvezEwo=; b=WvjEn8Lm5VzOIsYyJeuJ+g2mb/ETQREBJU6DfKW6Zxh1/aSomRvC/g1gtVT6ugJBts wh0SVgw0aMDB9pgMJupQp7qxX0VzwSHCYNVg76taIZyQP4Ay/XMtWswTf0HsJGR2+4Mq WQkOmGDEAzf9muktyG4Hk2p3/naZe3jv/qMa12lxrreHQhfnfMXddu7o2ddppywaDr6J Sg0+PQcXuj18xdHdwuvBlktegoMzir8JQUSGReVVvSEvjL3H9suKBTPpS5+SKU+sQsE7 XsHA9LyFhKmSa3I14P4bXMiZB4a4GUzYssCZcgLxXgnjDi2bgN6TudW3ZIk+EZp/yH/0 Ctwg== X-Gm-Message-State: AKwxytcvVtOotlownhoItSxB9oi7ttF20PfXLlua9o8ZK+aggJ7rjKHQ dRkDa2Mi5BWeGiYtzwgr6aH9VWJFThU= X-Received: by 10.36.243.7 with SMTP id t7mr23166748ith.139.1516211542541; Wed, 17 Jan 2018 09:52:22 -0800 (PST) Received: from xps15.cg.shawcable.net (S0106002369de4dac.cg.shawcable.net. [68.147.8.254]) by smtp.gmail.com with ESMTPSA id h72sm2694392ioe.61.2018.01.17.09.52.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 17 Jan 2018 09:52:21 -0800 (PST) From: Mathieu Poirier To: acme@kernel.org Cc: peterz@infradead.org, mingo@redhat.com, alexander.shishkin@linux.intel.com, namhyung@kernel.org, adrian.hunter@intel.com, mike.leach@arm.com, suzuki.poulosi@arm.com, jolsa@redhat.com, kim.phillips@arm.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v3 00/10] perf tools: Add support for CoreSight trace decoding Date: Wed, 17 Jan 2018 10:52:09 -0700 Message-Id: <1516211539-5166-1-git-send-email-mathieu.poirier@linaro.org> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Arnaldo, This patchset adds support for per-thread CoreSight trace decoding from the "perf report" interface. It is largely modelled on what has been done for intelPT traces and currently targets the ETMv4 architecture. Support for cpu-wide scenarios and ETMv3/PTMv1.1 will follow shortly. The trace decoding support is done using the Open CoreSight Decoding Library (openCSD), a stand alone open source project available here [1]. Integration of the openCSD library with the perf tools follow what has been done for other support libraries. If the library has been installed on a system the build scripts will automatially include support for CoreSight trace decoding. The status of the library on the system is displayed when adding the VF=1 option as per Jiri's patch [2]: ... timerfd: [ on ] ... sched_getcpu: [ on ] ... sdt: [ OFF ] ... setns: [ on ] ... libopencsd: [ on ] <--- Instructions on how to build and install the openCSD library are provided in the HOWTO.md of the project repository. We elected to keep the decoder library independent of the kernel tree as it is also used outside of the perf toolset and various non-linux projects. The work applies cleanly to [3] and depend on the following patches [4, 5]. Lastly there is a divergence of opinions on whether the decoding library should be part of the kernel tree or live on its own as we chose to do - your point of view on the matter would be greatly appreciated. Regards, Mathieu [1]. https://github.com/Linaro/OpenCSD [2]. https://marc.info/?l=linux-kernel&m=151549001914932&w=2 [3]. git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git perf/core [4]. https://marc.info/?l=linux-kernel&m=151561673423088&w=2 [5]. https://marc.info/?l=linux-kernel&m=151579875721440&w=2 Changes for V3: . Rebased to Acme's latest tree (a72594ca5c70) . Fixed indentation in Makefile.feature as per Jiri's request Changes for V2: . Rebased to Acme's latest (321e85e9458a) . Following what has been done for libdw and libbabeltrace and added the possibililty to use alternate header/library for development purposes. Mathieu Poirier (8): perf tools: Integrating the CoreSight decoding library perf tools: Add initial entry point for decoder CoreSight traces perf tools: Add decoder mechanic to support dumping trace data perf tools: Add support for decoding CoreSight trace data perf tools: Add functionality to communicate with the openCSD decoder pert tools: Add queue management functionality perf tools: Add full support for CoreSight trace decoding perf tools: Add mechanic to synthesise CoreSight trace packets Tor Jeremiassen (2): perf tools: Add processing of coresight metadata MAINTAINERS: Adding entry for CoreSight trace decoding MAINTAINERS | 3 +- tools/build/Makefile.feature | 3 +- tools/build/feature/Makefile | 7 +- tools/build/feature/test-all.c | 5 + tools/perf/Makefile.config | 25 + tools/perf/Makefile.perf | 2 + tools/perf/util/Build | 6 + tools/perf/util/auxtrace.c | 2 + tools/perf/util/cs-etm-decoder/Build | 1 + tools/perf/util/cs-etm-decoder/cs-etm-decoder.c | 513 ++++++++++++ tools/perf/util/cs-etm-decoder/cs-etm-decoder.h | 105 +++ tools/perf/util/cs-etm.c | 1023 +++++++++++++++++++++++ tools/perf/util/cs-etm.h | 18 + 13 files changed, 1710 insertions(+), 3 deletions(-) create mode 100644 tools/perf/util/cs-etm-decoder/Build create mode 100644 tools/perf/util/cs-etm-decoder/cs-etm-decoder.c create mode 100644 tools/perf/util/cs-etm-decoder/cs-etm-decoder.h create mode 100644 tools/perf/util/cs-etm.c -- 2.7.4