This is our current setup on a Hardkernel odroid-xu3 board based on EXYNOS5422.
1.- Board is running Ubuntu 14.04.1 LTS. Linux kernel 3.10.59 rebuilt with options:
CONFIG_GENERIC_TRACER
CONFIG_TRACING
CONFIG_CONTEXT_SWITCH_TRACER
CONFIG_PROFILING
CONFIG_HIGH_RES_TIMERS
CONFIG_LOCAL_TIMERS
CONFIG_PERF_EVENTS
CONFIG_HW_PERF_EVENTS
CONFIG_CPU_FREQ
2.- Streamline gatord version 20 (DS-5 v5.20) (built form source)
3.- Gator driver build with MALI support (patch applied as proposed in: http://community.arm.com/thread/6863).
When I capture using the Streamline Data View in Eclipse, I get values in Linux and Mali counters, but for all Cortex-A15 counters I tried, I get no values, just zero.
When I select events using Cortex-A15 counters, like the ones in the picture (Bus: Access, Clock:Cycles, Instruction: Executed, etc.) All this counters
always show zero values in the captured session. Other counters selected from Mali or Linux seen to work well.
By the way, in the Counter Configuration dialog box I can see Cortex-A15, Linux and Mali counters. But I can´t see any Cortex-A7 counter.
In the documentation I can find example pictures (as the one shown below) where A7 and A15 counters are shown together...
Should I see both of them A7 and A15?
In this last picture you can see as Mali counters (marked in green) are showing values when I run some OpenCL code on the GPU,
but counters for Cortex-A15 show no activity at all (marked in red).
Is there any special configuration for my Exynos 5 SoC to make Streamline capture the Cortex-A15 and A-7 counters?
I'm stuck right now, I can't find out what I am doing wrong. Any hint will be of great help.
Thanks!
Hi,
I asked in the Odroid forums, and It seems that performance counters on the Odroid-XU3 are not working.
The literal response was: " AFAIK it (performance counters) is not supported"
After some further research I found out this article:
Hardware counters depends on the PMU (Performance Monitor Unit) to work, and it seems that
PMU is not enabled or some permission bits have not been set.
Does anybody knows how to set up the PMU on?
I would appreciate any help.
Thanks
Hi andresr,
The document you reference is our best guide to resolving this issue. The DBGEN/NIDEN signal configuration is SoC dependent, thus search the Samsung documentation for these signal names and hopefully they provide instructions for enabling them.
Wade
Hello All,
I was looking for some perf measurement on Odroid-Xu3 at Samsung and was not able to read perf counters from Odroid -Xu3 device.
I have fixed this issue by adding correct arm-pmu interrupt numbers in dtsi file.
You can get patch from below link
https://github.com/kensoc/kendroid_kern ... b65591b06d
NOTE: Both A15 and A7 hw perf events/counters are not supported at this time.
By default, A15 hw perf events/counters are enabled.
To read/measure A7 hw perf events/counters, refer and uncomment arm-pmu section
of arch/arm/boot/dts/exynos5422_evt0.dtsi file.
Modified files are:
modified: arch/arm/boot/dts/exynos5422_evt0.dtsi
modified: arch/arm/configs/odroidxu3_defconfig
NOTE:
If you are using android OS with this modification, you will observer VOLD service crash and SDCARD won't mount correctly.
Solution:
When we have added ARM-PMU interrupt, kernel has changed platform device tree creations
and due to which "odroid-sysfs.16" was no more available and newly populated name is "odroid-sysfs.17".
This path was not recognized by VOLD service and file open was returning NULL which intern passed in fread operation and vold service was crashing.
Source path is: $ANDROIDSRC/system/vold/main.cpp +161
Old path is: /sys/bus/platform/drivers/odroid-sysfs/odroid_sysfs.16/boot_mode
New path is: /sys/bus/platform/drivers/odroid-sysfs/odroid_sysfs.17/boot_mode
Request to maintainer : pull this changes into mainline kernel and android source
I am having the same problem for my odroid XU4.
1. The performance counters are reading zero
2. I only have counters for cortexA15
3. Many GPU counters are missing.
I used this kernel source :GitHub - hardkernel/linux at odroidc-3.10.y . It is version Linux odroid 3.10.103. My DS5 version is DS-5_v5.25.0.
I have enabled all the configurations required:
- General Setup
- Kernel Performance Events And Counters
- [*] Kernel performance events and counters (enables CONFIG_PERF_EVENTS)
- [*] Profiling Support (enables CONFIG_PROFILING)
- [*] Enable loadable module support (enables CONFIG_MODULES, needed unless the gator driver is built into the kernel)
- [*] Module unloading (enables MODULE_UNLOAD)
- Kernel Features
- [*] High Resolution Timer Support (enables CONFIG_HIGH_RES_TIMERS)
- [*] Use local timer interrupts (only required for SMP and for version before Linux 3.12, enables CONFIG_LOCAL_TIMERS)
- [*] Enable hardware performance counter support for perf events (enables CONFIG_HW_PERF_EVENTS)
- CPU Power Management
- CPU Frequency scaling
- [*] CPU Frequency scaling (enables CONFIG_CPU_FREQ)
- Device Drivers
- Graphics support
- ARM GPU Configuration
- Mali Midgard series support
- [*] Streamline Debug support (enables CONFIG_MALI_GATOR_SUPPORT needed as part of Mali Midgard support)
- Kernel hacking
- [*] Compile the kernel with debug info (optional, enables CONFIG_DEBUG_INFO)
- [*] Tracers
- [*] Trace process context switches and events (#)
The kernel space gator is compiled and inserted.
What is wrong?
Hi Dynamicprofiling,
Thank you for your post. Your issues seemed to be in 3 distinct sections so to keep things simpler I have replied using the same sections:
1. Performance counters are reading zero
The article PMU counters are reading zeroes in Streamline that Andresr has posted should contain a lot of information that should help you with this issue. Please contact us if the article doesn't help with this issue and we will try and diagnose it further.
2. I only have counters for CortexA15
Counter values are dependent on which clusters are currently on line in the system so for some workloads. Try looking at when the system is idle and when the system has a heavy work load do you get different counter results?
3. Many GPU counters are missing:
The screenshots you show are only showing software counters which are almost given by default. All of the hardware counters seem to be missing. We have found that this is usually down to gator.ko building issues. Can you confirm that you are building the gator.ko with the following build time options:
GATOR_WITH_MALI_SUPPORT=MALI_MIDGARD DDK_DIR=".../path/to/Mali_DDK_kernel_files"
So in a typical kernel that has Mali integrated you can find your Mali_DDK_kernel_files in drivers/gpu/arm/...
More information about building your kernel and your gator.ko for Mali supporrt can be found in the readme section of your Streamline installation:
sw/streamline/gator/README.md
Hope this helps,
Stephen
Thank you Stephen,
<<<Can you confirm that you are building the gator.ko with the following build time options:
<<<GATOR_WITH_MALI_SUPPORT=MALI_MIDGARD DDK_DIR=".../path/to/Mali_DDK_kernel_files"
<<<So in a typical kernel that has Mali integrated you can find your Mali_DDK_kernel_files in drivers/gpu/arm/...
I built my gator using:
make -C ~/.../odroidxu3-3.10.y/ M=`pwd` ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- -modules GATOR_WITH_MALI_SUPPORT=MALI_MIDGARD MALI_DIR_MIDGARD="~/.../odroidxu3-3.10.y/drivers/gpu/arm/midgard"
So in sw/streamline/gator/README.md, it says:
___To add the corresponding support to Mali___
Userspace (scons) needs gator=1
I am not sure how can I add gator=1 to support mali. Where can I access the userspace?Can you please help?
Thanks a lot.
Hey DynamicProfiling,
The make option should be DDK_DIR not MALI_DIR_MIDGARD so that could be where you are getting some of your issues. The instructions can be found in README.md in the gator source director just scroll down to Mali GPU.
So there are 2 ways that you can build the Mali driver to have gator support. Kernel space or User space. If you want User Space support you will need to contact HardKernel directly as they will have access to the userspace source. Kernelspace support should be available if you just use the options in the README.md.
Alternatively if you are using a driver version greater than R13P0 the gator flag for userspace support should be enabled by default.