Bug 1393058 - Disable nsMemoryInfo dumper RT signal handling on Android. r=mccr8, a=lizzard
authorEric Rahm <erahm@mozilla.com>
Fri, 01 Sep 2017 15:27:44 -0700
changeset 423974 7f6aade38935c08c783c23d51160427011f92ef2
parent 423973 755dff9960436d7feb9b9ee34e0d61f644ad9faa
child 423975 7a6699a52aec8acfd69754f439b6fd0605d827c3
push id1517
push userjlorenzo@mozilla.com
push dateThu, 14 Sep 2017 16:50:54 +0000
treeherdermozilla-release@3b41fd564418 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmccr8, lizzard
bugs1393058
milestone56.0
Bug 1393058 - Disable nsMemoryInfo dumper RT signal handling on Android. r=mccr8, a=lizzard It appears some Android devices like to send spurious RT signals to our process which we interpret to mean a gc/cc log is being requested. This causes large files to pile up in the device storage. We can just disable this feature for Android as it would be pretty hard for a user to actually use (they can just go to about:memory). Automation can still enable the FIFO queue if we ever want to start dumping memory reports on device again.
xpcom/base/nsMemoryInfoDumper.cpp
--- a/xpcom/base/nsMemoryInfoDumper.cpp
+++ b/xpcom/base/nsMemoryInfoDumper.cpp
@@ -33,17 +33,19 @@
 #else
 #include <unistd.h>
 #endif
 
 #ifdef XP_UNIX
 #define MOZ_SUPPORTS_FIFO 1
 #endif
 
-#if defined(XP_LINUX) || defined(__FreeBSD__)
+// Some Android devices seem to send RT signals to Firefox so we want to avoid
+// consuming those as they're not user triggered.
+#if !defined(ANDROID) && (defined(XP_LINUX) || defined(__FreeBSD__))
 #define MOZ_SUPPORTS_RT_SIGNALS 1
 #endif
 
 #if defined(MOZ_SUPPORTS_RT_SIGNALS)
 #include <fcntl.h>
 #include <sys/types.h>
 #include <sys/stat.h>
 #endif