You copied the Doc URL to your clipboard.

Troubleshooting gator issues

Consult the following table for solutions to issues related to gator.



Kernel version before 4.6 with CONFIG_CPU_PM enabled produces invalid results. For example counters not showing any data, large spikes, and non-sensible values for counters. This issue is a result of the kernel PMU driver not saving state when the processor is powered down, or not restoring state when it is powered up. Upgrade to the latest version of the kernel, or apply the patch found at This patch applies cleanly to version 4.4, and it may also be possible to back port it to other versions. If you apply the patch, you may also need to apply the patch at
Incorrect data is displayed, or unexpected behavior is exhibited, for example the target kernel crashes.

Use kernel space gator.

User space gator is in beta release with known issues.

An Oops occurs when a processor is offlined (user space gator only). The fix was merged into mainline in 3.14-rc5, see, and has been backported to older kernels (3.4.83, 3.10.33, 3.12.14, and 3.13.6).

dmesg output:

CPU PMU: CPUx reading wrong counter -1

(user space gator only)

Update to the latest Linux kernel, or use kernel space gator.
Scheduler switch resolutions are on exact millisecond boundaries (user space gator only). Update to the latest Linux kernel, or use kernel space gator.

perf misidentifies the processor type.

Check if you are affected by running

ls /sys/bus/event_source/devices/

and verifying that the listed processor type is the one expected. For example, an A9 should return the following:

# ls /sys/bus/event_source/devices/ ARMv7_Cortex_A9 breakpoint software tracepoint

Upgrade to a later version of the kernel, or comment out the following call in gator_events_perf_pmu.c:

gator_events_perf_pmu_cpu_init(gator_cpu, type);

Error message generated:

Unable to mount the gator filesystem needed for profiling


Unable to load (insmod) gator.ko driver

while using SELinux and with the following dmesg output:

<7>[ 6745.475110] SELinux: initialized (dev gatorfs, type gatorfs), not configured for labeling

<5>[ 6745.477434] type=1400 audit(1393005053.336:10): avc: denied { mount } for pid=1996 comm="gatord-main" name="/" dev="gatorfs" ino=8733 scontext=u:r:shell:s0 tcontext=u:object_r:unlabeled:s0 tclass=filesystem

Disable SELinux then mount gatorfs by running # setenforce 0. When gator starts, you can reenable SELinux.
Mali Filmstrip does not work. dmesg output similar to:

<4>[ 585.367411] type=1400 audit(1421862808.850:48): avc: denied { search } for pid=3681 comm="mali-renderer" name="/" dev="gatorfs" ino=22378 scontext=u:r:untrusted_app:s0 tcontext=u:object_r:unlabeled:s0 tclass=dir

Use streamline_annotate.h and streamline_annotate.c from DS-5 v5.20 or later, or disable SELinux by running

# setenforce 0

Annotations do not work on Android. Disable SELinux by running # setenforce 0.

Target does not correctly emit uevents when processors go online or offline. As a result, CPU Activity with user space gator is 0% or 100% on a given processor. The Heat Map may also display many unresolved processes.

To test for this issue, run # ./gatord -d | grep uevent.

When processors go online or offline with user space gator, output similar to the following is emitted:

INFO: read(UEvent.cpp:61): uevent: offline@/devices/system/cpu/cpu1

INFO: read(UEvent.cpp:61): uevent: online@/devices/system/cpu/cpu1

Check the processors that are online or offline by running the following command:

# cat /sys/devices/system/cpu/cpu*/online

If the online and offline processors that the cat command shows change, but no cpu uevent is emitted, this issue affects the target.

Use kernel space gator.

The following issue occurs when starting gatord using ndk-build on an older version of Android:

# ./gatord

[1] + Stopped (signal) ./gatord


[1] Segmentation fault ./gatord


Starting with Android-L, only position independent executables (pie) are supported. However, some older versions of Android do not support them. To avoid this issue, modify and remove the references to pie.