On 15 December 2016 at 07:43, Sebastian Pop sebpop@gmail.com wrote:
Hi, could somebody help me understand why the total size of the recorded ETM trace differs from run to run? Is this something in my Juno machine setup, or do you also see this?
The maximum length that has been recorded is about 6MB on my setup. When I am recording the trace of the same program on intel-pt: $ perf record -e intel_pt//u ./sort the amount of captured data is deterministic (around 296MB +/- a few KB.)
What branch are you using? If it is perf-opencsd-4.8 or perf-opencsd-4.9-rc1 the ETR driver is not working properly. This is a problem that was discovered last week by a fellow from Marvell. Earlier this week I rebased the code to the latest kernel and pushed perf-opencsd-4.9.
That branch has another version of the ETR driver, one that work with contiguous memory rather than a scatter-gather list. Note that by default the amount of memory used by the driver is set to 1MB. You can modify that by using the "arm,buffer-size" binding in the DT specification. In this example [1] 3MB of memory is decidated to the ETR buffer.
With this ETR driver the amount of data collected with each run should be fairly similar.
Thanks, Mathieu
[1]. http://pastebin.com/s0iM7Px2
Thanks, Sebastian
sort.c is from https://gcc.gnu.org/wiki/AutoFDO/Tutorial
- gcc sort.c -o sort -O3
++ seq 1 10
- for i in '$(seq 1 10)'
- /root/etm/OpenCSD/tools/perf/perf record -e cs_etm/@20070000.etr/u
--per-thread ./sort Bubble sorting array of 30000 elements 7779 ms [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.610 MB perf.data ]
- for i in '$(seq 1 10)'
- /root/etm/OpenCSD/tools/perf/perf record -e cs_etm/@20070000.etr/u
--per-thread ./sort Bubble sorting array of 30000 elements 7789 ms [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.545 MB perf.data ]
- for i in '$(seq 1 10)'
- /root/etm/OpenCSD/tools/perf/perf record -e cs_etm/@20070000.etr/u
--per-thread ./sort Bubble sorting array of 30000 elements 7797 ms [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.353 MB perf.data ]
- for i in '$(seq 1 10)'
- /root/etm/OpenCSD/tools/perf/perf record -e cs_etm/@20070000.etr/u
--per-thread ./sort Bubble sorting array of 30000 elements 5949 ms [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.353 MB perf.data ]
- for i in '$(seq 1 10)'
- /root/etm/OpenCSD/tools/perf/perf record -e cs_etm/@20070000.etr/u
--per-thread ./sort Bubble sorting array of 30000 elements 7807 ms [ perf record: Woken up 2 times to write data ] [ perf record: Captured and wrote 3.287 MB perf.data ]
- for i in '$(seq 1 10)'
- /root/etm/OpenCSD/tools/perf/perf record -e cs_etm/@20070000.etr/u
--per-thread ./sort Bubble sorting array of 30000 elements 7772 ms [ perf record: Woken up 3 times to write data ] Warning: AUX data lost 2 times out of 4!
[ perf record: Captured and wrote 0.126 MB perf.data ]
- for i in '$(seq 1 10)'
- /root/etm/OpenCSD/tools/perf/perf record -e cs_etm/@20070000.etr/u
--per-thread ./sort Bubble sorting array of 30000 elements 7811 ms [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.001 MB perf.data ]
- for i in '$(seq 1 10)'
- /root/etm/OpenCSD/tools/perf/perf record -e cs_etm/@20070000.etr/u
--per-thread ./sort Bubble sorting array of 30000 elements 7784 ms [ perf record: Woken up 3 times to write data ] Warning: AUX data lost 2 times out of 4!
[ perf record: Captured and wrote 0.619 MB perf.data ]
- for i in '$(seq 1 10)'
- /root/etm/OpenCSD/tools/perf/perf record -e cs_etm/@20070000.etr/u
--per-thread ./sort Bubble sorting array of 30000 elements 7770 ms [ perf record: Woken up 2 times to write data ] Warning: AUX data lost 1 times out of 1!
[ perf record: Captured and wrote 0.002 MB perf.data ]
- for i in '$(seq 1 10)'
- /root/etm/OpenCSD/tools/perf/perf record -e cs_etm/@20070000.etr/u
--per-thread ./sort Bubble sorting array of 30000 elements 5934 ms [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 1.236 MB perf.data ]