From patchwork Mon Apr 16 19:35:27 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Poirier X-Patchwork-Id: 133489 Delivered-To: patch@linaro.org Received: by 10.46.84.18 with SMTP id i18csp3926704ljb; Mon, 16 Apr 2018 12:35:42 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+hIo5lssVGwmsx3w2HBgj4+3fDT5kf1+0VK9LWLvQsPyXVI5KA5CrX4Bqy4hsK0jg8L2dN X-Received: by 10.98.202.212 with SMTP id y81mr22813555pfk.227.1523907342370; Mon, 16 Apr 2018 12:35:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523907342; cv=none; d=google.com; s=arc-20160816; b=kUr8WzXWzS+1i1g7WVVTbixmFpzZQBYv+BVLLPgxgqYCh6wjin2SF1W2gUlTPlVBmv X6ayBFmnz+NEQmyEkraWv2C+mwPr/FEhWBbET6ydJTmbCMhjrtqS2dK/1u+571SwiOqc gL07SNYJSppyxxdmhYDskDM6DJNJbTn7kekJsKcn68+HD3wSqZVL7GVf0tfsThes4woh sErshtCalcBPgt3eM+Sl8bfzPxQMXo/9biYo72KGZS8T5UDmWz7isd+ekYCQdcQsHFKb xvwwZzoR/dkikyJYlx1esMv3KR+Az8AgxEqZOl6oJL3Hz8yq51dm6skFtKndnpJ8OPJe l4oQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=mwxs/3GSnnpGv40NGEimJRnXh8ZyV7w1diNPqpQj8MM=; b=wsViPL6tOvAVwUdzlMqfPTpWe0Y4/V9H9ehnRxWKy0mPSPjDWb2CBc1Zq/DQcLR0jg 8myBWF5uPJA6xEMgqSWiX2lomivBfD2va93mJItF4Q3LxD8GWmAbY7f4IGSO3eOPph3f wUlck/2Nouvpo283+B3zURxzqTpeZyp57VIfqSGEMF5HMn9iO6630A09kY7mbn9H/InP 6uZs7uHVWaFlB9CUmGx2hzc5BP1UJrvQggRGEmhoTgQcObEeprs8TWEaD941ri2WuNSN TuZnGoEOCkXB4pY+4Nq2CszjlYBRksjSyWXqXhJN62kzkkKh9kAG+M6+m1PZ0gMcOfFe IaPA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=XaNCUzOz; 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 e9si10187349pgv.306.2018.04.16.12.35.42; Mon, 16 Apr 2018 12:35:42 -0700 (PDT) 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=XaNCUzOz; 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 S1753565AbeDPTfk (ORCPT + 29 others); Mon, 16 Apr 2018 15:35:40 -0400 Received: from mail-pl0-f68.google.com ([209.85.160.68]:38520 "EHLO mail-pl0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753435AbeDPTfe (ORCPT ); Mon, 16 Apr 2018 15:35:34 -0400 Received: by mail-pl0-f68.google.com with SMTP id c7-v6so10596608plr.5 for ; Mon, 16 Apr 2018 12:35:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=mwxs/3GSnnpGv40NGEimJRnXh8ZyV7w1diNPqpQj8MM=; b=XaNCUzOzrU77Li4mek0j4Om9plooqIzFi3zD64/maHQ3yl1gdB9vs3Mvyyjpv+8nbT +2pN2iMR2RJEDj1trgZ1wHSPMBgo1unEj3ze1a5XwLd/4vGzWujXgY71vIPiwLvuU4Pt /toINP3YYW64XlGlq6JCaWr0ivzRe94i9kidc= 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:in-reply-to :references; bh=mwxs/3GSnnpGv40NGEimJRnXh8ZyV7w1diNPqpQj8MM=; b=eSF/eP/JLkmQ4dc7s7cktfzvLvJoTAD7gEbzb6bwaQd0kgd+egtGKCE4on+2ja9xsM kYs+wbc/65cvL5/U2UxqQOXZ7wy+C4fOkQiGuGDwjHADZiMr4uS6cTl9KW/ZErR3O0SB ERG3YVsXV3Ugt0QKBHnpEUVBhjm6BpS3ewXAL6iYfzKJLfdkN/HBxyt+IttBt6ww8GMx B8Yu4HKiqbkw/KYOlkbzizB0e7heMwE0+jGcO25VR+nRwpjZfYyaNbqO6I8oZoqqUN1y vTarsppQMV0Kds0SCkqce+eASckKXcJcyr1j/rYJyFksUjtkFYcL/AQ3q0pTMVvFzryL rWqg== X-Gm-Message-State: ALQs6tDWU20a+fQLi/RGUQPuCQ1OtervWYWqnJGxDro10LqDgBXfH+PQ rjuiImN3pA7FSnOKpqPISGnaFg== X-Received: by 2002:a17:902:5992:: with SMTP id p18-v6mr16951630pli.49.1523907334184; Mon, 16 Apr 2018 12:35:34 -0700 (PDT) Received: from xps15.cg.shawcable.net (S0106002369de4dac.cg.shawcable.net. [68.147.8.254]) by smtp.gmail.com with ESMTPSA id b78sm7038785pfj.6.2018.04.16.12.35.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 16 Apr 2018 12:35:33 -0700 (PDT) From: Mathieu Poirier To: linux-arm-kernel@lists.infradead.org, corbet@lwn.net Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Ben.Gainey@arm.com Subject: [PATCH 3/3] coresight: Grouping all perf tools oriented section together Date: Mon, 16 Apr 2018 13:35:27 -0600 Message-Id: <1523907327-20979-4-git-send-email-mathieu.poirier@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1523907327-20979-1-git-send-email-mathieu.poirier@linaro.org> References: <1523907327-20979-1-git-send-email-mathieu.poirier@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch groups together section pertaining to the perf tools. That way everything is at the same place rather than spread out. Signed-off-by: Mathieu Poirier --- Documentation/trace/coresight.txt | 72 +++++++++++++++++++-------------------- 1 file changed, 36 insertions(+), 36 deletions(-) -- 2.7.4 diff --git a/Documentation/trace/coresight.txt b/Documentation/trace/coresight.txt index 8caae8050a60..32c5b159e8fc 100644 --- a/Documentation/trace/coresight.txt +++ b/Documentation/trace/coresight.txt @@ -345,42 +345,7 @@ More information on the above and other example on how to use Coresight with the perf tools can be found in the "HOWTO.md" file of the openCSD gitHub repository [3]. -How to use the STM module -------------------------- - -Using the System Trace Macrocell module is the same as the tracers - the only -difference is that clients are driving the trace capture rather -than the program flow through the code. - -As with any other CoreSight component, specifics about the STM tracer can be -found in sysfs with more information on each entry being found in [1]: - -root@genericarmv8:~# ls /sys/bus/coresight/devices/20100000.stm -enable_source hwevent_select port_enable subsystem uevent -hwevent_enable mgmt port_select traceid -root@genericarmv8:~# - -Like any other source a sink needs to be identified and the STM enabled before -being used: - -root@genericarmv8:~# echo 1 > /sys/bus/coresight/devices/20010000.etf/enable_sink -root@genericarmv8:~# echo 1 > /sys/bus/coresight/devices/20100000.stm/enable_source - -From there user space applications can request and use channels using the devfs -interface provided for that purpose by the generic STM API: - -root@genericarmv8:~# ls -l /dev/20100000.stm -crw------- 1 root root 10, 61 Jan 3 18:11 /dev/20100000.stm -root@genericarmv8:~# - -Details on how to use the generic STM API can be found here [2]. - -[1]. Documentation/ABI/testing/sysfs-bus-coresight-devices-stm -[2]. Documentation/trace/stm.txt - - -Using perf tools ----------------- +2.1) AutoFDO analysis using the perf tools: perf can be used to record and analyze trace of programs. @@ -428,3 +393,38 @@ sort example is from the AutoFDO tutorial (https://gcc.gnu.org/wiki/AutoFDO/Tuto $ taskset -c 2 ./sort_autofdo Bubble sorting array of 30000 elements 5806 ms + + +How to use the STM module +------------------------- + +Using the System Trace Macrocell module is the same as the tracers - the only +difference is that clients are driving the trace capture rather +than the program flow through the code. + +As with any other CoreSight component, specifics about the STM tracer can be +found in sysfs with more information on each entry being found in [1]: + +root@genericarmv8:~# ls /sys/bus/coresight/devices/20100000.stm +enable_source hwevent_select port_enable subsystem uevent +hwevent_enable mgmt port_select traceid +root@genericarmv8:~# + +Like any other source a sink needs to be identified and the STM enabled before +being used: + +root@genericarmv8:~# echo 1 > /sys/bus/coresight/devices/20010000.etf/enable_sink +root@genericarmv8:~# echo 1 > /sys/bus/coresight/devices/20100000.stm/enable_source + +From there user space applications can request and use channels using the devfs +interface provided for that purpose by the generic STM API: + +root@genericarmv8:~# ls -l /dev/20100000.stm +crw------- 1 root root 10, 61 Jan 3 18:11 /dev/20100000.stm +root@genericarmv8:~# + +Details on how to use the generic STM API can be found here [2]. + +[1]. Documentation/ABI/testing/sysfs-bus-coresight-devices-stm +[2]. Documentation/trace/stm.txt +[3]. https://github.com/Linaro/perf-opencsd