From: Mathieu Poirier <mathieu.poirier@linaro.org>
To: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org, alexander.shishkin@linux.intel.com,
Mathieu Poirier <mathieu.poirier@linaro.org>,
linux-doc@vger.kernel.org
Subject: [PATCH 10/10] coresight: documenting range and start/stop filtering
Date: Mon, 18 Jul 2016 13:51:31 -0600 [thread overview]
Message-ID: <1468871491-10997-11-git-send-email-mathieu.poirier@linaro.org> (raw)
In-Reply-To: <1468871491-10997-1-git-send-email-mathieu.poirier@linaro.org>
To reduce the amount of traces generated by tracers range
and start/stop address filtering has been implemented. This
patch provides example on how to use the various options
currently supported.
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Cc: linux-doc@vger.kernel.org
---
Documentation/trace/coresight.txt | 48 +++++++++++++++++++++++++++++++++++++++
1 file changed, 48 insertions(+)
diff --git a/Documentation/trace/coresight.txt b/Documentation/trace/coresight.txt
index a2e7ccb62c2b..a19d7e60937a 100644
--- a/Documentation/trace/coresight.txt
+++ b/Documentation/trace/coresight.txt
@@ -408,6 +408,54 @@ Instruction 13570831 0x8026B584 E28DD00C false ADD
Instruction 0 0x8026B588 E8BD8000 true LDM sp!,{pc}
Timestamp Timestamp: 17107041535
+Address filtering
+-----------------
+
+CoreSight tracers produce an astonishing amount of traces, more often than not
+much more than trace buffers can handle, and definilty far beyond the
+processing capabilities of humans. To trim down the amount of trace generated
+address filters can be specified from the perf command line.
+
+Currently supported filters include range and start/stop address. When a
+range is specified traces will be collected when the instruction pointer falls
+within the specified addresses. For start and stop filters, traces collection
+start when the instuction pointer matches the start address, and stop when
+the stop address has been reached.
+
+Filters can be specified from the perf command line as follow:
+
+- To start trace collection when the IP equal a specific function in a binary
+ executable or library:
+
+ perf record -e cs_etm// --filter 'start 0x72c@/opt/lib/libcstest.so.1.0' --per-thread ./main
+
+- To stop trace collection when the IP equal a specific function in a binary
+ executable of library:
+
+ perf record -e cs_etm// --filter 'stop 0x790@/opt/lib/libcstest.so.1.0' --per-thread ./main
+
+- To start and stop tracing at various stages of kernel execution:
+
+ perf record -e cs_etm// --filter 'start 0xffffff800856bc50,stop 0xffffff800856bcb0,start 0xffffff8008562d0c,stop 0xffffff8008562d30' --per-thread uname
+
+The only requirement on the number of start/stop filters is that they don't go
+beyond the amount of comparator implemented on the system. Range filters are
+specified using a slightly different syntax:
+
+- To collect traces in a specific range in a binary executable or a library:
+
+ perf record -e cs_etm// --filter 'filter 0x72c/0x40@/opt/lib/libcstest.so.1.0' --per-thread ./main
+
+- To collect traces in a specific range in kernel space:
+
+ perf record -e cs_etm// --filter 'filter 0xffffff8008562d0c/0x48' --per-thread uname
+
+This time the number of comparator _pairs_ implemented in the trace engine is
+the only restriction on the amount of filters that can be specified.
+
+It is possible to mix user and kernel space filters, as long as they are the
+same type. Mixing range and start/stop filters is currently not supported.
+
How to use the STM module
-------------------------
--
2.7.4
prev parent reply other threads:[~2016-07-18 19:52 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-18 19:51 [PATCH 00/10] coresight: implementing address filtering Mathieu Poirier
2016-07-18 19:51 ` [PATCH 01/10] coresight: etm-perf: pass struct perf_event to source::enable/disable() Mathieu Poirier
2016-07-20 15:34 ` Suzuki K Poulose
2016-07-21 15:23 ` Mathieu Poirier
2016-07-18 19:51 ` [PATCH 02/10] coresight: remove duplicated enumeration Mathieu Poirier
2016-07-18 19:51 ` [PATCH 03/10] coresight: etm-perf: configuring filters from perf core Mathieu Poirier
2016-07-20 16:07 ` Suzuki K Poulose
2016-07-21 15:15 ` Mathieu Poirier
2016-07-21 17:12 ` Mathieu Poirier
2016-07-18 19:51 ` [PATCH 04/10] coresight: etm4x: split default and filter configuration Mathieu Poirier
2016-07-18 19:51 ` [PATCH 05/10] coresight: etm4x: cleaning up default " Mathieu Poirier
2016-07-18 19:51 ` [PATCH 06/10] coresight: etm4x: adding range filter configuration function Mathieu Poirier
2016-07-18 19:51 ` [PATCH 07/10] coresight: etm4x: configuring include/exclude function Mathieu Poirier
2016-07-18 19:51 ` [PATCH 08/10] coresight: etm4x: adding configurable address range filtering Mathieu Poirier
2016-07-18 19:51 ` [PATCH 09/10] coresight: etm4x: adding configurable start/stop filtering Mathieu Poirier
2016-07-18 19:51 ` Mathieu Poirier [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1468871491-10997-11-git-send-email-mathieu.poirier@linaro.org \
--to=mathieu.poirier@linaro.org \
--cc=alexander.shishkin@linux.intel.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®