Bug 838625 - Add logcat logging to ProcessPriorityManager. r=cjones
authorJustin Lebar <justin.lebar@gmail.com>
Fri, 08 Feb 2013 14:32:23 +0000
changeset 121323 41ce5bbd68593ab6a92984a39a3763c2c529c5ca
parent 121322 e14df225437201c53ed51e4c7de13ed346720fbb
child 121324 35cc0b94300be461d5f0b4d10018e9003707706f
push id22685
push userjlebar@mozilla.com
push dateFri, 08 Feb 2013 14:37:00 +0000
treeherdermozilla-inbound@75899c659a0b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerscjones
bugs838625
milestone21.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 838625 - Add logcat logging to ProcessPriorityManager. r=cjones The logging is placed behind an #if 0 guard.
dom/ipc/ProcessPriorityManager.cpp
--- a/dom/ipc/ProcessPriorityManager.cpp
+++ b/dom/ipc/ProcessPriorityManager.cpp
@@ -53,19 +53,26 @@ static StaticRefPtr<ProcessPriorityManag
 #ifdef LOG
 #undef LOG
 #endif
 
 // Enable logging by setting
 //
 //   NSPR_LOG_MODULES=ProcessPriorityManager:5
 //
-// in your environment.
+// in your environment.  Or just comment out the "&& 0" below, if you're on
+// Android/B2G.
 
-#ifdef PR_LOGGING
+#if defined(ANDROID) && 0
+#include <android/log.h>
+#define LOG(fmt, ...) \
+  __android_log_print(ANDROID_LOG_INFO, \
+      "Gecko:ProcessPriorityManager", \
+      fmt, ## __VA_ARGS__)
+#elif defined(PR_LOGGING)
 static PRLogModuleInfo*
 GetPPMLog()
 {
   static PRLogModuleInfo *sLog;
   if (!sLog)
     sLog = PR_NewLogModule("ProcessPriorityManager");
   return sLog;
 }