Lines Matching full:perf

1 HOWTO - using the library with perf   {#howto_perf}
4 @brief Using command line perf and OpenCSD to collect and decode trace.
6 This HOWTO explains how to use the perf cmd line tools and the openCSD
12 On Target Trace Acquisition - Perf Record
15 Compile the perf tool from the same kernel source code version you are using with:
17 make -C tools/perf
19 This will yield a `perf` executable that will support CoreSight trace collection.
24 If you are instead planning to use perf to record and decode the trace on the target,
25 compile the perf tool linking against the openCSD library, in the following way:
27 make -C tools/perf VF=1 CORESIGHT=1
30 in the section **Off Target Perf Tools Compilation**.
45 option on the perf command line. Once a sink has been identify trace collection
48 linaro@linaro-nano:~/kernel$ ./tools/perf/perf record -e cs_etm/@tmc_etr0/ --per-thread uname
50 This will generate a `perf.data` file where execution has been traced for both
56 …linaro@linaro-nano:~/kernel$ ./tools/perf/perf record -vvv -e cs_etm/@tmc_etr0/u --per-thread uname
94 perf event ring buffer mmapped per thread
98 [ perf record: Woken up 1 times to write data ]
107 [ perf record: Captured and wrote 0.072 MB perf.data ]
109 linaro@linaro-nano:~/kernel$ ls -l ~/.debug/ perf.data
110 _-rw------- 1 linaro linaro 77888 Mar 2 20:41 perf.data
136 perf record -e cs_etm/@tmc_etr0/k --filter 'filter 0xffffff8008562d0c/0x48' --per-thread uname
138perf record -e cs_etm/@tmc_etr0/u --filter 'filter 0x72c/0x40@/opt/lib/libcstest.so.1.0' --per-thr…
176perf record -e cs_etm/@tmc_etr0/k --filter 'start 0xffffff800856bc50,stop 0xffffff800856bcb0' --pe…
178 perf record -vvv -e cs_etm/@tmc_etr0/u --filter 'start 0x72c@/opt/lib/libcstest.so.1.0, \
187perf record -e cs_etm/@tmc_etr0/k --filter 'start 0xffffff800856bc50,stop 0xffffff800856bcb0, \ /…
199 Presently this threshold is fixed at 256 cycles for `perf record`.
201 Command line options in `perf record` to use these features are part of the options for the `cs_etm…
203 perf record -e cs_etm/timestamp,cycacc,@tmc_etr0/ --per-thread uname
205 At current version, `perf record` and `perf script` do not use this additional information.
207 The cs_etm perf event
210 System information for this perf pmu event can be found at:
231 The entire program flow will have been recorded in the `perf.data` file.
262 linaro@linaro-nano:~/kernel$ tar czf uname.trace.tgz perf.data ~/.debug
271 The openCSD library is not part of the perf tools. It is available on
272 [github][1] and needs to be compiled before the perf tools. Checkout the
326 Off Target Perf Tools Compilation
329 As mentioned above the openCSD library is not part of the perf tools' code base
332 perf tools build script:
334 linaro@t430:~/linaro/linux-kernel$ make CORESIGHT=1 VF=1 -C tools/perf
358 At the end of the compilation a new perf binary is available in `tools/perf/`:
360 linaro@t430:~/linaro/linux-kernel$ ldd tools/perf/perf
396 When compiling the perf tools it is possible to reference another version of
399 libraries intact. Two environment variable are available to tell the perf tools
405 linaro@t430:~/linaro/linux-kernel$ make CORESIGHT=1 VF=1 -C tools/perf
414 Trace Decoding with Perf Report
419 where the perf tools and openCSD library have been compiled.
432 -rw------- 1 linaro linaro 78016 Feb 24 12:21 perf.data
435 Perf is expecting files related to the trace capture (`perf.data`) to be located in the `buildid` d…
439 perf config --system buildid.dir=/my/own/buildid/dir
445 linaro@t430:~/linaro/coresight/sept20$ ../perf-opencsd-master/tools/perf/perf report --stdio
447 # To display the perf.data header info, please use --header/--header-only options.
489 mjl@ubuntu-vbox:./perf-opencsd-master/coresight/tools/perf/perf report --stdio --dump
533 Trace Decoding with Perf Script
535 Working with perf scripts needs more command line options but yields
538 …:~/linaro/coresight/sept20$ export EXEC_PATH=/home/linaro/coresight/perf-opencsd-master/tools/perf/
541 …linaro@t430:~/linaro/coresight/sept20$ ../perf-opencsd-master/tools/perf/perf --exec-path=${EXEC_P…
571 explicitely to perf using the "--vmlinux" command line option:
573 …linaro@t430:~/linaro/coresight/sept20$ ../perf-opencsd-master/tools/perf/perf report --stdio --vml…
576 …linaro@t430:~/linaro/coresight/sept20$ ../perf-opencsd-master/tools/perf/perf script --vmlinux=./v…
581 …:~/linaro/coresight/sept20$ export EXEC_PATH=/home/linaro/coresight/perf-opencsd-master/tools/perf/
584 …linaro@t430:~/linaro/coresight/sept20$ ../perf-opencsd-master/tools/perf/perf --exec-path=${EXEC_P…
592 The option "--vmlinux=./vmlinux" is interpreted by the "perf script" command
593 the same way it if for "perf report". The option "-k ./vmlinux" is dependant
598 Perf Test Environment Scripts
602 offline build and test environment for perf, and executing tests.
606 decoder/tests/perf-test-scripts
610 - `perf-setup-env.bash` : this sets up all the environment variables mentioned above.
611 - `perf-test-report.bash` : this runs `perf report` - using the environment setup by `perf-setup-e…
612 - `perf-test-script.bash` : this runs `perf script` - using the environment setup by `perf-setup-e…
616 1. Prior to building perf, edit `perf-setup-env.bash` to conform to your environment. There are fou…
620 source perf-setup-env.bash
622 This will set up a perf execute environment for using the perf report and script commands.
626 source perf-setup-env.base buildenv
629 environment for using the used by the `perf-test...` scripts to run the tests.
631 3. Build perf as described above.
633 5. Copy the `perf-test...` scripts into the capture data directory -> the one that contains `perf.d…
635 …fault operation, but any command line options will be added to the perf report / perf script comma…
639 ./perf-test-report.bash --dump
643 ${PERF_EXEC_PATH}/perf report --stdio --dump