Friends,
I'm reading section 3.3.4 (RAM Read Pointer Register) of the
"CoreSight Trace Memory Controller Technical Reference Manual",
revision r0p1 and I'm puzzled.
The second paragraph of the "Purpose" section reads as follow:
"The value written to this register must be a byte-address aligned to
the width of the trace memory databus and to a frame boundary. For
example, for 64-bit wide trace memory and 128-bit wide trace memory,
the four LSBs must be 0s. For 256-bit wide trace memory, the five LSBs
must be 0s..."
So for 64 bit wide memory RRP can be set to values like 0, 8, 16,
24... for 128 bit 0, 16, 32, 48... and for 256 bit 0, 32, 64...
What is perplexing is the statement about the LSBs. Things work for
256 bit and 128 bit with 5 and 4 LSBs respectively but for 64 bit, it
should be 3 and not 4 as mentioned.
Am I missing something here? Can someone double check me?
Thanks,
Mathieu
Good day all,
New bundles can be found here [1]. It is the same 'uname' command but
generated with the only two options currently supported: timestamp and
cycle accurate. We can add more at will but let's start with that.
On V3 the options are pushed to the hardware and as such the trace
format should change accordingly. On ETMv4 the perf framework does
convey the options but they are not configured in the tracers. Even
if the options are set the traces won't reflect it - this is obviously
only temporary and will be fixed after I release the 3rd version of
the patchset.
I have verified the validity of the headers (both for V3 and V4) along
with the information they conveys. The layouts haven't changed from
what I previously had [2] - the only difference is that config
registers are artificially generated from options provided on the cmd
line.
On the topic of configuration registers, at this time TRACEIDR on V3
and TRCCONFIGR on V4 __have the same layout__, i.e bit 12 for cycle
accurate and bit 28 for timestamp. I simply did not see the need to
select a different bit field layout for V4 since Tor's code will
ultimately parse that before feeding it to the decode library. A
different layout for V4 would mean more code for Tor - get back to me
if you think enacting the V4 TRCCONFIGR layout is important.
Keep in mind that nothing of this is set in stone, if you think we can
do better please speak up. Mike and Al, this doesn't support ETMv4.1.
Let's discuss this further at the meeting on Wednesday. For now (and
for a little while) I need to concentrate on getting the 3rd iteration
of the patchset out.
Regards,
Mathieu
[1]. http://people.linaro.org/~mathieu.poirier/openCSD/
[2]. https://git.linaro.org/people/mathieu.poirier/coresight.git/blob/refs/heads…
---------- Forwarded message ----------
From: Mathieu Poirier <mathieu.poirier(a)linaro.org>
Date: 3 November 2015 at 21:27
Subject: Collection of metadata in a multi-session environment
To: private-opencsd <private-opencsd(a)linaro.org>
As reported in my other email (Trace bundles for ETMv3/v4) moving to a
multi-session scheme his forcing me to rethink how metadata is
collected as one can no longer assume that what gets read from sysFS
actually pertains to the session being reported.
When looking at the required registers (once again, please refer to
Mike's document, section 4.3.1 to 4.3.3) a lot of them are RO:
ETMv3/PTM: ETMIDR
ETMv4: TRCIDR[0, ..., 13], TRCAUTHSTATUS
Some are RW but can easily be made RO when using the CS framework from Perf:
ETMv3/PTM: ETMTRACEID
ETMv4: TRCTRACEIDR
In fact I remember having this conversation with Mike in San Francisco
and nobody would cry if we were to let the framework decide the
traceIDs configured on the tracers.
Anything that is RO can still be retrieved using the current sysFS
driven method since their values don't change. That leaves us with
the other RW registers:
ETMv3/PTM: ETMCR, ETMCCR
ETMv4: TRCCONFIGR
The question is, what information is needed from these registers in
order to do trace decoding? Is there anything in there that is coming
from the HW that can't be deduced otherwise? From what I understand
we are talking about user configurable options that could be
communicated to the trace decoding library using other means than
conveying the whole registers. Using a bitmap is the first option
that comes to mind, i.e, if cycle accurate tracing is configured, bit
X is set.
With the above in mind I need you guys to help me identify the
mandatory information in those tracer registers that is needed for
trace decoding. Once again we can discuss this further in our meeting
tomorrow.
Thanks,
Mathieu
---------- Forwarded message ----------
From: Mathieu Poirier <mathieu.poirier(a)linaro.org>
Date: 3 November 2015 at 11:48
Subject: Trace bundles for ETMv3/v4
To: private-opencsd <private-opencsd(a)linaro.org>
After a programming marathon I am please to bring you trace bundles
for both ETMv3[1] and v4[2]. The code is based on the latest
development branch[3], something that seemed like a good idea to avoid
maintaining two different tree. It certainly served the purpose but
other problems inherent to that approach have also showed up - more on
that later.
Since the ETMv4 has more metadata (as per Mike's enclosed document[4])
I had to modify the AUX_TRACE header format. The new format can be
found here [5], with the assignment of the slots described here [6].
The end result is that ETMv3 headers will have zero'ed out slots,
something I can't avoid since the auxiliary area foundation assumes a
fix amount of data for all tracers. It's not my ideal solution but we
can always try to change the world when things are actually working.
The perf.data file found in both bundles have been generated using this command:
$ perf record -vvv -e cs_etm// --per-thread uname
As such the amount of traces should be relatively small. In the
bundles you will also find the .debug directory, the perf.data file
and a medata.txt file. The latter is simply a snapshot of the
relevant registers as listed in Mike's document[4]. The snapshot was
taken *after* the trace run and only there to *somewhat* make sense of
how things were configured, which brings us to the problems I've
hinted about earlier.
Contrary to V1 and V2 the newest code base is configuring tracers as
the event is scheduled rather than at initialisation time, making the
metadata in the perf.data completely irrelevant. I will likely have a
solution for that so hang tight, it's coming.
Please have a look and we'll touch base in the meeting tomorrow.
Regards,
Mathieu
[1]. uname.etmv3.tgz
[2]. uname.etmv4.tgz
[3]. https://git.linaro.org/people/mathieu.poirier/coresight.git/shortlog/refs/h…
[4]. RefTrcDecode-API and Components_0v3.pdf
[5]. https://git.linaro.org/people/mathieu.poirier/coresight.git/blob/refs/heads…
[6]. https://git.linaro.org/people/mathieu.poirier/coresight.git/blob/refs/heads…