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/BUILD b/BUILD
index 7695658..34851ea 100644
--- a/BUILD
+++ b/BUILD
@@ -1465,6 +1465,8 @@
filegroup(
name = "src_traced_probes_probes_src",
srcs = [
+ "src/traced/probes/kmem_activity_trigger.cc",
+ "src/traced/probes/kmem_activity_trigger.h",
"src/traced/probes/probes_producer.cc",
"src/traced/probes/probes_producer.h",
],