Hi,
I am trying to profile Mali GPU counters on Odroid XU3 using Streamline. I have downloaded DS-5 Ultimate Edition trial for this purpose and built and run the gator daemon on the board ( using the steps from https://github.com/ARM-software/gator )
1. I am having some trouble with the GATOR_WITH_MALI_SUPPORT=MALI_MIDGARD flags, make does not seem to recognize this option. Without it I am able to compile and run.
2. I am able to see the Cortex A15/A7 stats but no GPU counters are visible on Streamline. Is this related to the previous step?
3. Does DS-5 Community Edition not support Streamline? I initially used that and it said there was no valid license.
4. Is there a way to read/log the GPU counter data on the board itself without using a host PC app like Streamline? If yes, could you please point me to documentation to enable this?
Thanks,
Manoj
Hi Manoj,
I thought I would provide some information about each one of your questions:
1) This option is needed to build Gator with counters enabled for Mali. The reason you can still build it without means that gator will be built without any Mali support at all.
For the flag to work you will need access to some parts of the Mali Driver source. Are you building gator seperate from the kernel for your board or are you building it as part of the kernel source?
The best option for getting Mali Counters is to just use the userspace gator daemon that comes prebuilt with Streamline. Place the gatord binary from DS-5/sw/streamline/bin/arm/gatord onto your target and then run it. You should then be able to connect to Streamline and get counters for the GPU.
2) Yes with you not including the GATOR_WITH_MALI_SUPPORT into your build gator will build with CPU support only.
3) Yes DS-5 Community edition should support Streamline. When did Streamline say there was no valid licence was it upon launching Streamline?
4) No unfortunately the only way to use GPU counter data is to use Streamline. This is because Streamline knows how to interact with the Mali driver to get the counters.
Hope this helps,Stephen
Hi Stephen,
The CPU counters are the ones that crash the system. If I do not read from the CPU PMU, then things work smoothly. Trying to export the capture data into text or csv formats so that I can analyse them.
You mentioned "This is because Streamline knows how to interact with the Mali driver to get the counters" - this means we should be able to interact with Mali driver to obtain GPU counter data directly on the board right? The github page also mentions something about the perf API. Are there any patches that can help me read this data directly from the board?
Manoj.
Hi Manoj
Glad to see that you have managed to get GPU counters out of the system using the userspace gator. The issue you are describing seems to be a problem with the way that the board has been setup. I will ask internally if we have any OdroidXU3s and what the current status of them is.
In the meantime could you look at using the perf application to collect your CPU counters. You are correct that Streamline uses the perf api to collect CPU counter data. So if you manage to collect valid data from the perf application this will point to a bug in Streamline. If the perf application fails to collect valid data then it is a problem with the way the system is configured.
As an aside if you manage to collect perf data from the perf application you should be able to import this data into Streamline directly until we can solve the issue. More information on this can be found in Chaprter 3.3 in the Streamline User Guide.
Hope this helps,
Stephen
I can use Linux perf application on the same board to collect valid CPU counter data. I do not have any issue with it.
I would rather prefer if I could collect GPU counter data like I collect perf CPU data, on the board directly.
Thank you for getting back to me I will get someone from the Streamline team to understand why this didn't work.
Kind regards,
I have looked into this issue with the Streamline team and unfortunately it is a kernel bug. Around the time that this kernel came out some investigation was done by the team. This is a known issue and is documented in the readme that comes with gator.
The solution unfortunately is to either update the kernel version to a version that patches the problem or to use the gator.ko to capture the CPU and the GPU counters. Which would mean you would need to build gator.ko correctly.
Looking at the latest kernel version it is 3.10.106 hopefully this will include the patch that is needed. However the actual fix is in 3.14 so we need to hope that the fix has been backported to this version.
So to recap we recommended:
1) Trying the latest version of the kernel from the hardkernel.
2) Try building gator.ko with Mali support flags following the readme.
3) IF nethither work. Do you CPU analyis with gator.ko or importing the perf information into Streamline and then using the userspace to get the GPU counters seperately.
View all questions in Arm Development Studio forum