Merge "Enable fdtrack in system_server." am: 62d4abfd06 am: 7a3ca3763b am: a27fabe484

Change-Id: I2e560d3a21eb77b970e5589462caf3d989b32d01
This commit is contained in:
Automerger Merge Worker
2020-01-31 16:57:39 +00:00
2 changed files with 69 additions and 1 deletions

View File

@@ -365,6 +365,12 @@ public final class SystemServer {
*/
private static native void initZygoteChildHeapProfiling();
/**
* Spawn a thread that monitors for fd leaks.
*/
private static native void spawnFdLeakCheckThread();
/**
* The main entry point from zygote.
*/
@@ -499,6 +505,11 @@ public final class SystemServer {
initZygoteChildHeapProfiling();
}
// Debug builds - spawn a thread to monitor for fd leaks.
if (Build.IS_DEBUGGABLE) {
spawnFdLeakCheckThread();
}
// Check whether we failed to shut down last time we tried.
// This call may not return.
performPendingShutdown();