On Wed, 24 Apr 2019 at 06:25, Wojciech Żmuda wzmuda@n7space.com wrote:
Hi Leo,
I ran your script on a Zynq Ultrascale+ devboard with 'perf test ...' and it succeeded. After examining the source code, I came up with the following questions:
- What about other sinks? For now I see it is hardcoded to look for sysfs devices with *.etr only.
For example, Zynq US+ has one TMC-ETR and two TMC-ETFs - shouldn't ETFs be tested as well?
One problem with designing a test suite for coresight is that all implementation are different. Leo's test program works well on platform such as HiKey, QC410c, Juno and the Ultrascale+ where an ETR is available to collect traces from all processors. But on platform where an ETR is not available or where there is one ETR per cluster, the test won't run properly. It will also fail on future platforms enacting a 1:1 source/sink topology. One option is to script all sort of sorcery to determine the best sink to use but we'd always find an exception to break the heuristic.
We've been planning to enhance the framework with the capability to detect the best sink to use [1], which would remove the need to identify a sink on the perf command line. That would essentially fix the above mentioned problems. But for now and since we don't have that feature yet I suggest the test script be modified to look for more than an ETR. For example if an ETR is found on the system things proceed as they currently do. Otherwise look for an ETF and proceed if found. Last look for an ETB. Note that this won't solve the problem where a system as one ETR per cluster - that will require more thinking.
Suzuki is also working on a way to discover system topology from sysfs [2], something that could be useful for testing. I encourage people to have a look and comment on the approach.
Thanks, Mathieu
[1]. That feature is in need of willing hands if someone is interested. [2]. https://lkml.org/lkml/2019/4/15/644 (patch 36/36)
- Is there any sink naming convention? AFAIR sysfs file names depend on what's in DTS. I can imagine
a situation where I have two ETRs with nodes names etr1@88f00f00, etr2@88f00f80 - the script will not discover them. I took a brief look at the bindings document and I don't see any obvious remarks on how should we name DTS nodes. Sorry if I confused something here, but perhaps this is the right moment to establish such convention?
Best regards, Wojciech _______________________________________________ CoreSight mailing list CoreSight@lists.linaro.org https://lists.linaro.org/mailman/listinfo/coresight