Sysprop for the count of active OOME tracing sessions
In order for ART code to call perfetto DataSource::Trace() we need to
wait for all data source instances to have completed their setup. To do
so, we need to know how many of them exist.
This introduces a new sysprop traced.oome_heap_session.count, writeable
by perfetto traced and readable by apps and system_server that can be
used to communicate this.
See go/art-oom-heap-dump for more details
Test: manual, atest HeapprofdJavaCtsTest
Bug: 269246893
Change-Id: Ib8220879a40854f98bc2f550ff2e7ebf3e077756
diff --git a/private/system_server.te b/private/system_server.te
index 8b1d124..2f9dc44 100644
--- a/private/system_server.te
+++ b/private/system_server.te
@@ -838,6 +838,9 @@
# Write tuner.server.enable
set_prop(system_server, tuner_server_ctl_prop)
+# Allow the heap dump ART plugin to the count of sessions waiting for OOME
+get_prop(appdomain, traced_oome_heap_session_count_prop)
+
# Create a socket for connections from debuggerd.
allow system_server system_ndebug_socket:sock_file create_file_perms;