Support a PerfettoTrace Java API
Added a layer on top of the Perfetto C SDK that allows creating equivalent 'PerfettoTeHl' structs on the heap. This makes it possible for Java objects to control the lifetime of these objects through JNI. Each PerfettoTeHl struct has an equivalent C++ class allocated on the heap which is in turn managed by an equivalent Java class managed by the Java heap. This design allows us to allocate objects once and re-use them to serialize the trace event data from Java into the shmem. The Java layer is responsible for caching the Perfetto Java objects to avoid GC churn. Test: atest PerfettoTraceTest Change-Id: Ibb08e8b6cab7d86ac2c1d57c621c9074a4cb4077 Bug: 303199244 Flag: android.os.perfetto_sdk_tracing_v2
Loading
Please register or sign in to comment