From: punit.agrawal@arm.com (Punit Agrawal)
To: linux-arm-kernel@lists.infradead.org
Subject: Decoding the PTM traces
Date: Wed, 14 Nov 2012 15:35:39 +0000 [thread overview]
Message-ID: <50A3BA4B.3080804@arm.com> (raw)
In-Reply-To: <CAKZGPAP_GQh4xCXamsBOUjkfSk=Hvm96dYQD7qCbjpNWtox+tw@mail.gmail.com>
On 14/11/12 15:13, Arun KS wrote:
> Hello Punit,
>
> On Wed, Nov 14, 2012 at 8:28 PM, Punit Agrawal <punit.agrawal@arm.com> wrote:
>> Hi Arun,
>>
>> You can think of the trace in the ETB as the raw stream resulting from
>> the multiplexing of different trace streams. So to get to the PTM trace
>> you'll first have to de-multiplex the stream, and then decode the stream
>> based on the source - in this case PTM.
>>
>> The format of the data stored in the ETB is described in the ETM TRM
>> Section 9.6
>> (http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0314h/Bgbhhidd.html).
>> The decoding should give you a trace stream for each active trace
>> source. The ATBID can be used to de-multiplex multiple sources, e.g.,
>> the two PTMs associated with the two A9s.
After sending the previous email, I had a quick look at etm.c and
noticed that it configures the ETB formatter to run in "Bypass" mode,
i.e., it doesn't introduce any formatting into the trace stream.
>>
>> The PTM stream can then be decoded using the Program Flow Trace Protocol
>> described in Program Flow Trace Architecture Specification Section 4
>> (http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ihi0035b/Chddbbdf.html).
> So do you mean that there is no open source tool which decodes this as
> of now and I have to write one?
I don't know of any open source tool to decode PTM trace.
But in light of the above finding, decoding only PTM trace should give
you the information you are after.
Hope that makes it a little bit easier.
Punit
>> Out of curiosity, may I ask what are you trying to do?
> The main intention is to debug freeze issues using PTM traces.
> When a device is in freeze, my intention is to collect PTM traces
> from ETB and decode.
> So that I ll get traces of last few branches and exceptions.
>
> Thanks,
> Arun
>
>> Hope this helps. Feel free to ask for clarification.
>>
>> Cheers,
>> Punit
>>
>>
>>
>>
>> On 14/11/12 14:04, Arun KS wrote:
>>> Hello,
>>>
>>> I m trying to capture and decode PTM trace from Cortex A9 dual core.
>>>
>>> I m successful in configuring the driver(arch/arm/kernel/etm.c) and
>>> setting the funnel to get data in ETB.
>>> But I don't know how to decode these traces.
>>>
>>> Anyone has any pointers?
>>>
>>> Thanks,
>>> Arun
>>>
>>> _______________________________________________
>>> linaro-dev mailing list
>>> linaro-dev at lists.linaro.org
>>> http://lists.linaro.org/mailman/listinfo/linaro-dev
>>>
>>>
>>>
>>
>> -- IMPORTANT NOTICE: The contents of this email and any attachments are
>> confidential and may also be privileged. If you are not the intended
>> recipient, please notify the sender immediately and do not disclose the
>> contents to any other person, use it for any purpose, or store or copy the
>> information in any medium. Thank you.
>>
>
>
-- IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
next prev parent reply other threads:[~2012-11-14 15:35 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-14 14:04 Decoding the PTM traces Arun KS
2012-11-14 14:58 ` Punit Agrawal
2012-11-14 15:13 ` Arun KS
2012-11-14 15:35 ` Punit Agrawal [this message]
2012-11-14 23:25 ` Arve Hjønnevåg
2012-11-15 3:41 ` Arun KS
2012-11-16 4:33 ` Arun KS
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=50A3BA4B.3080804@arm.com \
--to=punit.agrawal@arm.com \
--cc=linux-arm-kernel@lists.infradead.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;
as well as URLs for NNTP newsgroup(s).