From 6ce2d9966d9a3a220fb85cdcb50eeda4b2ed535d Mon Sep 17 00:00:00 2001 From: Florian Mayer Date: Tue, 16 Oct 2018 14:30:02 +0100 Subject: [PATCH] Allow zygote to keep socket to heapprofd. This allows users to target zygote for heap profiling without causing it to crash on ForkCommon. This also allows us to profile zygote in benchmark runs where we want to profile as many processes as possible. Bug: 117821125 Test: m Test: flashed walleye Change-Id: I3f41b64e0a64e362eafd02cd4e86cb77e434d94c --- core/jni/fd_utils.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/core/jni/fd_utils.cpp b/core/jni/fd_utils.cpp index c5904e0e9e5ef..d457a1b48e381 100644 --- a/core/jni/fd_utils.cpp +++ b/core/jni/fd_utils.cpp @@ -37,6 +37,7 @@ static const char* kPathWhitelist[] = { "/dev/socket/zygote", "/dev/socket/zygote_secondary", "/dev/socket/webview_zygote", + "/dev/socket/heapprofd", "/sys/kernel/debug/tracing/trace_marker", "/system/framework/framework-res.apk", "/dev/urandom",