From patchwork Fri Dec 15 16:44:49 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Poirier X-Patchwork-Id: 122120 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp706218qgn; Fri, 15 Dec 2017 08:45:11 -0800 (PST) X-Google-Smtp-Source: ACJfBosSjFs64Ep6dsJUbvwuhw4MGilLNa8SskvKpyqUPXZRLwLkDTStRwUzZ8xAcbCWQqVMOyFQ X-Received: by 10.159.253.144 with SMTP id q16mr14383847pls.104.1513356311172; Fri, 15 Dec 2017 08:45:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1513356311; cv=none; d=google.com; s=arc-20160816; b=Ik7s2swiDVNKXMncY0U3rSQtNw9wazVwfdUTixvfpptYn5fgqKhPZ+9pa0ZQMK6hvx bV+NMbscT5fm6fVNfqmKCtQ/SyXCYGe7A0Bj5VEyXJNk8jHLp+JZYD7D2Gvqf+XJ7r1n KcMvBOxODNMlqZooIkQwn/5r78xjJgwUoP1KzSVqOoE5vj5bf0skgNq54lGfwU23NAqu m+WgbfRQLp2AhKGyEotTLVxNnYXAuH2H9lxdR8GCoa19q8uhkV6NkyUEgBmQtPbQizTq ctYqXiTvz8+ZMrDcts+MsXdC2fV4b3uK3d1D/LW3V5fbfGji85owtiV3Y66yclDp/gxU f+Qg== 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=Z/bbkT2ZHGVIUaZwGr4j2AYZDHhlykmcrLN7JWxhDkM=; b=s9wES1DIyPqsvxZh9tYo3IR9hI4fKjqQB431Dz9ZUcf+bxY844e5rqurPh6W5c0hWA 2yFWqzqQ7Fo97zhzrYiXBD8A9vPQMr5He4d0XoR3ATxkj7KfML0DUynousSGNQTOYGJm PUpfYi7edknnwnJSy2XEwY2t8gSk+w3aa1vy687clJNtbJMspP0zsq0CxNOsfcfaEpbe Qhaq3erfyy/3WYWqEX4PZWP0pVSvgfDqjAZvCh1GlqixnP2/RyakdLSlTycmRbX60SA9 4xd5J03pFcDMV5hjRfYxOSOf1onUz8N5g1014OeFqXRjiCsNTesgo1ZdkdpiF0qBOGeA VhSw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ctO3mDy/; 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 x8si5132816plv.554.2017.12.15.08.45.10; Fri, 15 Dec 2017 08:45:11 -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=ctO3mDy/; 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 S1756862AbdLOQpH (ORCPT + 24 others); Fri, 15 Dec 2017 11:45:07 -0500 Received: from mail-it0-f46.google.com ([209.85.214.46]:43185 "EHLO mail-it0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756767AbdLOQpD (ORCPT ); Fri, 15 Dec 2017 11:45:03 -0500 Received: by mail-it0-f46.google.com with SMTP id u62so20976071ita.2 for ; Fri, 15 Dec 2017 08:45:03 -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=Z/bbkT2ZHGVIUaZwGr4j2AYZDHhlykmcrLN7JWxhDkM=; b=ctO3mDy/jdFO89OnJg7CEWplzZ1btSVyjNoXd/kcDQu/sF4DzGIsMOqj/5fr36O2Fe veflFyaqjVs+HcWqUATBeYO3tOQSdMVWl0pNZOJo2CixbS5l/4ptza5q6xtN6KuOLLqI rfZNogsIZ9RZeidlFnZ83509rNbJXT0sUNh5o= 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=Z/bbkT2ZHGVIUaZwGr4j2AYZDHhlykmcrLN7JWxhDkM=; b=ihNQAlDFfa6Drxf/cBctSmcn4cJ1ydDt+XrXZDYa5Dj/x9ulvz7RkTMFcUO5+d952f NKY4CjnvVnK1JCDyq9zuEY2TUty8sejNIEfpB8Rtr75XsnNoLVJpzOMrotV3atVC+4We kAQlYNhaw+KkaNi5fgR7J2YxFWXPzudk8nQXZZBZtE/2GmJooBG0rzgGwkTfJdXZ7RM1 hGwijkItIIkG54q1FGN35KTB1suuJWUIas1dPeg1QaugjHxtl7LUwkoRndOGfuYI/baj XkFlwzhdWXm0hXMA6iV97qjFN2HcE5L7F987Iu8Fi1xgbcnhJg8RrCUwkFqfqb1AKl0+ ROPw== X-Gm-Message-State: AKGB3mK9LvRupMgHTvEUvUSCfvNr3WfdQhisFGHhWzuC0tjfqJrH0ZSO dJKKF9SH1vqmy/jF6Q4o5Fm5fw== X-Received: by 10.107.55.138 with SMTP id e132mr13671378ioa.82.1513356302819; Fri, 15 Dec 2017 08:45:02 -0800 (PST) Received: from xps15.cg.shawcable.net (S0106002369de4dac.cg.shawcable.net. [68.147.8.254]) by smtp.gmail.com with ESMTPSA id q132sm3631732iod.26.2017.12.15.08.45.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 15 Dec 2017 08:45:01 -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, tor@ti.com, jolsa@redhat.com, mathieu.poirier@linaro.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 00/10] perf tools: Add support for CoreSight trace decoding Date: Fri, 15 Dec 2017 09:44:49 -0700 Message-Id: <1513356299-26274-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 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 include support for CoreSight trace decoding: ... zlib: [ on ] ... lzma: [ OFF ] ... get_cpuid: [ on ] ... bpf: [ 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 [2] and proper functionning of the feature depends on this patch [3]. Review and comments would be greatly appreciated. Regards, Mathieu [1]. https://github.com/Linaro/OpenCSD [2]. git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git perf/core [3]. https://lkml.org/lkml/2017/12/14/612 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 | 6 +- tools/build/feature/Makefile | 6 +- tools/build/feature/test-all.c | 5 + tools/build/feature/test-libopencsd.c | 8 + tools/perf/Makefile.config | 13 + 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, 1705 insertions(+), 4 deletions(-) create mode 100644 tools/build/feature/test-libopencsd.c 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