traced_probes: Add kmem_activity trigger
kmem_activity gets triggered when there is detected kernel memory
activity -- kswapd, direct reclaim, compaction. This is used a hueristic
for memory pressure, which allows for signaling perfetto to capture
system memory state during periods of memory pressure.
Bug: 155928119
Test: adb root
adb push test/configs/mm_events.cfg /data/local/tmp/
adb shell 'cat /data/local/tmp/mm_events.cfg | perfetto --txt -c - -o /data/misc/perfetto-traces/trace'
[In another shell] Synthesize memory pressure (e.g adb shell /data/local/tmp/lmkd_unit_test)
adb pull /data/misc/perfetto-traces/trace
Change-Id: Id0a5dad2f6e557606801bad0a58ea180123f54fd
diff --git a/Android.bp b/Android.bp
index 1567a65..42cd999 100644
--- a/Android.bp
+++ b/Android.bp
@@ -8153,6 +8153,7 @@
filegroup {
name: "perfetto_src_traced_probes_probes_src",
srcs: [
+ "src/traced/probes/kmem_activity_trigger.cc",
"src/traced/probes/probes_producer.cc",
],
}