Dear Suzuki,




From: Suzuki K Poulose <suzuki.poulose@arm.com>
Sent: 10 June 2019 18:15
To: Student - Ng Yi Zher Jeremy; mathieu.poirier@linaro.org
Cc: coresight@lists.linaro.org
Subject: Re: Request for Guidance in Using sysFS for Coresight in HiKey960 (Cortex A53/A73)
 
Hi,


On 10/06/2019 09:49, Student - Ng Yi Zher Jeremy wrote:
> Dear Sir,
>
> My apologies for spamming you with more, perhaps ridiculous, questions...
>
> I have been struggling to understand the systematic approach to conduct system
> traces with sysFS. I have asked similar question to hwangcc23, but I feel this
> question is suited more for the Linaro team.


>
> I am having trouble choosing the options for the coresight drivers in my
> Hikey960 device with Cortex A53 and A73 processors, 4 CPUs each. I have created
> a simple program that is a quick implementation of a link list in C program. The
> following is the objdump of the main object:

Is there any reason, why you wouldn't use the perf tool ? The perf tool will
automatically trace your application as it gets scheduled in/out on the CPU.
Using sysfs mode is not ideal for tracing a process.
My apologies for not using perf tool, however I was unable to find a tutorial or source code that allows me to cross-compile perf for Android use.

Android's simpleperf is not able to hook/trace ETM processes.

Nonetheless, I am aware of the existence of perf but not able to implement it in this mini-project of mine due to incompatibility.

You may try:

perf record -e cs_etm/@ec033000.etr/ --per-thread <your-application>


Please note that, if your application is multi-threaded, you may need
to use the latest version of the kernel/perf tools.


Cheers
Suzuki
Thank you very much for your expertise advise! I appreciate it very much.

Cheers,
Jeremy

The above message may contain confidential and/or proprietary information that is exempt from disclosure under applicable law and is intended for receipt and use solely by the addressee(s) named above. If you are not the intended recipient, you are hereby notified that any use, dissemination, distribution, or copying of this message, or any attachment, is strictly prohibited. If you have received this email in error, please inform the sender immediately by reply e-mail or telephone, reversing the charge if necessary. Please delete the message thereafter. Thank you.