Add lwis tracing_mark_write ftrace event
Bug: 258115890
Test: Build pass
Change-Id: I35c05902eff8b90b398c06ea9c6781e3ea1e8dc3
diff --git a/Android.bp b/Android.bp
index ec024f4..0397cf8 100644
--- a/Android.bp
+++ b/Android.bp
@@ -4821,6 +4821,7 @@
"protos/perfetto/trace/ftrace/kmem.proto",
"protos/perfetto/trace/ftrace/kvm.proto",
"protos/perfetto/trace/ftrace/lowmemorykiller.proto",
+ "protos/perfetto/trace/ftrace/lwis.proto",
"protos/perfetto/trace/ftrace/mali.proto",
"protos/perfetto/trace/ftrace/mdss.proto",
"protos/perfetto/trace/ftrace/mm_event.proto",
@@ -5061,6 +5062,7 @@
"protos/perfetto/trace/ftrace/kmem.proto",
"protos/perfetto/trace/ftrace/kvm.proto",
"protos/perfetto/trace/ftrace/lowmemorykiller.proto",
+ "protos/perfetto/trace/ftrace/lwis.proto",
"protos/perfetto/trace/ftrace/mali.proto",
"protos/perfetto/trace/ftrace/mdss.proto",
"protos/perfetto/trace/ftrace/mm_event.proto",
@@ -5130,6 +5132,7 @@
"external/perfetto/protos/perfetto/trace/ftrace/kmem.gen.cc",
"external/perfetto/protos/perfetto/trace/ftrace/kvm.gen.cc",
"external/perfetto/protos/perfetto/trace/ftrace/lowmemorykiller.gen.cc",
+ "external/perfetto/protos/perfetto/trace/ftrace/lwis.gen.cc",
"external/perfetto/protos/perfetto/trace/ftrace/mali.gen.cc",
"external/perfetto/protos/perfetto/trace/ftrace/mdss.gen.cc",
"external/perfetto/protos/perfetto/trace/ftrace/mm_event.gen.cc",
@@ -5199,6 +5202,7 @@
"protos/perfetto/trace/ftrace/kmem.proto",
"protos/perfetto/trace/ftrace/kvm.proto",
"protos/perfetto/trace/ftrace/lowmemorykiller.proto",
+ "protos/perfetto/trace/ftrace/lwis.proto",
"protos/perfetto/trace/ftrace/mali.proto",
"protos/perfetto/trace/ftrace/mdss.proto",
"protos/perfetto/trace/ftrace/mm_event.proto",
@@ -5268,6 +5272,7 @@
"external/perfetto/protos/perfetto/trace/ftrace/kmem.gen.h",
"external/perfetto/protos/perfetto/trace/ftrace/kvm.gen.h",
"external/perfetto/protos/perfetto/trace/ftrace/lowmemorykiller.gen.h",
+ "external/perfetto/protos/perfetto/trace/ftrace/lwis.gen.h",
"external/perfetto/protos/perfetto/trace/ftrace/mali.gen.h",
"external/perfetto/protos/perfetto/trace/ftrace/mdss.gen.h",
"external/perfetto/protos/perfetto/trace/ftrace/mm_event.gen.h",
@@ -5341,6 +5346,7 @@
"protos/perfetto/trace/ftrace/kmem.proto",
"protos/perfetto/trace/ftrace/kvm.proto",
"protos/perfetto/trace/ftrace/lowmemorykiller.proto",
+ "protos/perfetto/trace/ftrace/lwis.proto",
"protos/perfetto/trace/ftrace/mali.proto",
"protos/perfetto/trace/ftrace/mdss.proto",
"protos/perfetto/trace/ftrace/mm_event.proto",
@@ -5409,6 +5415,7 @@
"external/perfetto/protos/perfetto/trace/ftrace/kmem.pb.cc",
"external/perfetto/protos/perfetto/trace/ftrace/kvm.pb.cc",
"external/perfetto/protos/perfetto/trace/ftrace/lowmemorykiller.pb.cc",
+ "external/perfetto/protos/perfetto/trace/ftrace/lwis.pb.cc",
"external/perfetto/protos/perfetto/trace/ftrace/mali.pb.cc",
"external/perfetto/protos/perfetto/trace/ftrace/mdss.pb.cc",
"external/perfetto/protos/perfetto/trace/ftrace/mm_event.pb.cc",
@@ -5478,6 +5485,7 @@
"protos/perfetto/trace/ftrace/kmem.proto",
"protos/perfetto/trace/ftrace/kvm.proto",
"protos/perfetto/trace/ftrace/lowmemorykiller.proto",
+ "protos/perfetto/trace/ftrace/lwis.proto",
"protos/perfetto/trace/ftrace/mali.proto",
"protos/perfetto/trace/ftrace/mdss.proto",
"protos/perfetto/trace/ftrace/mm_event.proto",
@@ -5546,6 +5554,7 @@
"external/perfetto/protos/perfetto/trace/ftrace/kmem.pb.h",
"external/perfetto/protos/perfetto/trace/ftrace/kvm.pb.h",
"external/perfetto/protos/perfetto/trace/ftrace/lowmemorykiller.pb.h",
+ "external/perfetto/protos/perfetto/trace/ftrace/lwis.pb.h",
"external/perfetto/protos/perfetto/trace/ftrace/mali.pb.h",
"external/perfetto/protos/perfetto/trace/ftrace/mdss.pb.h",
"external/perfetto/protos/perfetto/trace/ftrace/mm_event.pb.h",
@@ -5619,6 +5628,7 @@
"protos/perfetto/trace/ftrace/kmem.proto",
"protos/perfetto/trace/ftrace/kvm.proto",
"protos/perfetto/trace/ftrace/lowmemorykiller.proto",
+ "protos/perfetto/trace/ftrace/lwis.proto",
"protos/perfetto/trace/ftrace/mali.proto",
"protos/perfetto/trace/ftrace/mdss.proto",
"protos/perfetto/trace/ftrace/mm_event.proto",
@@ -5688,6 +5698,7 @@
"external/perfetto/protos/perfetto/trace/ftrace/kmem.pbzero.cc",
"external/perfetto/protos/perfetto/trace/ftrace/kvm.pbzero.cc",
"external/perfetto/protos/perfetto/trace/ftrace/lowmemorykiller.pbzero.cc",
+ "external/perfetto/protos/perfetto/trace/ftrace/lwis.pbzero.cc",
"external/perfetto/protos/perfetto/trace/ftrace/mali.pbzero.cc",
"external/perfetto/protos/perfetto/trace/ftrace/mdss.pbzero.cc",
"external/perfetto/protos/perfetto/trace/ftrace/mm_event.pbzero.cc",
@@ -5757,6 +5768,7 @@
"protos/perfetto/trace/ftrace/kmem.proto",
"protos/perfetto/trace/ftrace/kvm.proto",
"protos/perfetto/trace/ftrace/lowmemorykiller.proto",
+ "protos/perfetto/trace/ftrace/lwis.proto",
"protos/perfetto/trace/ftrace/mali.proto",
"protos/perfetto/trace/ftrace/mdss.proto",
"protos/perfetto/trace/ftrace/mm_event.proto",
@@ -5826,6 +5838,7 @@
"external/perfetto/protos/perfetto/trace/ftrace/kmem.pbzero.h",
"external/perfetto/protos/perfetto/trace/ftrace/kvm.pbzero.h",
"external/perfetto/protos/perfetto/trace/ftrace/lowmemorykiller.pbzero.h",
+ "external/perfetto/protos/perfetto/trace/ftrace/lwis.pbzero.h",
"external/perfetto/protos/perfetto/trace/ftrace/mali.pbzero.h",
"external/perfetto/protos/perfetto/trace/ftrace/mdss.pbzero.h",
"external/perfetto/protos/perfetto/trace/ftrace/mm_event.pbzero.h",
@@ -11011,6 +11024,7 @@
"protos/perfetto/trace/ftrace/kmem.proto",
"protos/perfetto/trace/ftrace/kvm.proto",
"protos/perfetto/trace/ftrace/lowmemorykiller.proto",
+ "protos/perfetto/trace/ftrace/lwis.proto",
"protos/perfetto/trace/ftrace/mali.proto",
"protos/perfetto/trace/ftrace/mdss.proto",
"protos/perfetto/trace/ftrace/mm_event.proto",
diff --git a/BUILD b/BUILD
index 4d127db..274d5ed 100644
--- a/BUILD
+++ b/BUILD
@@ -3700,6 +3700,7 @@
"protos/perfetto/trace/ftrace/kmem.proto",
"protos/perfetto/trace/ftrace/kvm.proto",
"protos/perfetto/trace/ftrace/lowmemorykiller.proto",
+ "protos/perfetto/trace/ftrace/lwis.proto",
"protos/perfetto/trace/ftrace/mali.proto",
"protos/perfetto/trace/ftrace/mdss.proto",
"protos/perfetto/trace/ftrace/mm_event.proto",
diff --git a/protos/perfetto/trace/ftrace/all_protos.gni b/protos/perfetto/trace/ftrace/all_protos.gni
index bfb0878..3998c2b 100644
--- a/protos/perfetto/trace/ftrace/all_protos.gni
+++ b/protos/perfetto/trace/ftrace/all_protos.gni
@@ -49,6 +49,7 @@
"kmem.proto",
"kvm.proto",
"lowmemorykiller.proto",
+ "lwis.proto",
"mali.proto",
"mdss.proto",
"mm_event.proto",
diff --git a/protos/perfetto/trace/ftrace/ftrace_event.proto b/protos/perfetto/trace/ftrace/ftrace_event.proto
index bd7a0ab..b40deed 100644
--- a/protos/perfetto/trace/ftrace/ftrace_event.proto
+++ b/protos/perfetto/trace/ftrace/ftrace_event.proto
@@ -49,6 +49,7 @@
import "protos/perfetto/trace/ftrace/kmem.proto";
import "protos/perfetto/trace/ftrace/kvm.proto";
import "protos/perfetto/trace/ftrace/lowmemorykiller.proto";
+import "protos/perfetto/trace/ftrace/lwis.proto";
import "protos/perfetto/trace/ftrace/mali.proto";
import "protos/perfetto/trace/ftrace/mdss.proto";
import "protos/perfetto/trace/ftrace/mm_event.proto";
@@ -574,5 +575,6 @@
TrustyEnqueueNopFtraceEvent trusty_enqueue_nop = 464;
CmaAllocStartFtraceEvent cma_alloc_start = 465;
CmaAllocInfoFtraceEvent cma_alloc_info = 466;
+ LwisTracingMarkWriteFtraceEvent lwis_tracing_mark_write = 467;
}
}
diff --git a/protos/perfetto/trace/ftrace/lwis.proto b/protos/perfetto/trace/ftrace/lwis.proto
new file mode 100644
index 0000000..7ed2e29
--- /dev/null
+++ b/protos/perfetto/trace/ftrace/lwis.proto
@@ -0,0 +1,16 @@
+// Autogenerated by:
+// ../../src/tools/ftrace_proto_gen/ftrace_proto_gen.cc
+// Do not edit.
+
+syntax = "proto2";
+package perfetto.protos;
+
+message LwisTracingMarkWriteFtraceEvent {
+ optional int32 pid = 1;
+ optional string trace_name = 2;
+ optional uint32 trace_begin = 3;
+ optional string func_name = 4;
+ optional string lwis_name = 5;
+ optional uint32 type = 6;
+ optional int64 value = 7;
+}
diff --git a/protos/perfetto/trace/perfetto_trace.proto b/protos/perfetto/trace/perfetto_trace.proto
index a68d278..07ec4bc 100644
--- a/protos/perfetto/trace/perfetto_trace.proto
+++ b/protos/perfetto/trace/perfetto_trace.proto
@@ -6405,6 +6405,20 @@
// End of protos/perfetto/trace/ftrace/lowmemorykiller.proto
+// Begin of protos/perfetto/trace/ftrace/lwis.proto
+
+message LwisTracingMarkWriteFtraceEvent {
+ optional int32 pid = 1;
+ optional string trace_name = 2;
+ optional uint32 trace_begin = 3;
+ optional string func_name = 4;
+ optional string lwis_name = 5;
+ optional uint32 type = 6;
+ optional int64 value = 7;
+}
+
+// End of protos/perfetto/trace/ftrace/lwis.proto
+
// Begin of protos/perfetto/trace/ftrace/mali.proto
message MaliTracingMarkWriteFtraceEvent {
@@ -7870,6 +7884,7 @@
TrustyEnqueueNopFtraceEvent trusty_enqueue_nop = 464;
CmaAllocStartFtraceEvent cma_alloc_start = 465;
CmaAllocInfoFtraceEvent cma_alloc_info = 466;
+ LwisTracingMarkWriteFtraceEvent lwis_tracing_mark_write = 467;
}
}
diff --git a/src/tools/ftrace_proto_gen/event_list b/src/tools/ftrace_proto_gen/event_list
index f5bcfa9..d39f23c 100644
--- a/src/tools/ftrace_proto_gen/event_list
+++ b/src/tools/ftrace_proto_gen/event_list
@@ -461,3 +461,4 @@
trusty/trusty_enqueue_nop
cma/cma_alloc_start
cma/cma_alloc_info
+lwis/tracing_mark_write
diff --git a/src/traced/probes/ftrace/event_info.cc b/src/traced/probes/ftrace/event_info.cc
index 15866e0..836212b 100644
--- a/src/traced/probes/ftrace/event_info.cc
+++ b/src/traced/probes/ftrace/event_info.cc
@@ -6440,6 +6440,34 @@
35,
kUnsetSize},
{"tracing_mark_write",
+ "lwis",
+ {
+ {kUnsetOffset, kUnsetSize, FtraceFieldType::kInvalidFtraceFieldType,
+ "pid", 1, ProtoSchemaType::kInt32,
+ TranslationStrategy::kInvalidTranslationStrategy},
+ {kUnsetOffset, kUnsetSize, FtraceFieldType::kInvalidFtraceFieldType,
+ "trace_name", 2, ProtoSchemaType::kString,
+ TranslationStrategy::kInvalidTranslationStrategy},
+ {kUnsetOffset, kUnsetSize, FtraceFieldType::kInvalidFtraceFieldType,
+ "trace_begin", 3, ProtoSchemaType::kUint32,
+ TranslationStrategy::kInvalidTranslationStrategy},
+ {kUnsetOffset, kUnsetSize, FtraceFieldType::kInvalidFtraceFieldType,
+ "func_name", 4, ProtoSchemaType::kString,
+ TranslationStrategy::kInvalidTranslationStrategy},
+ {kUnsetOffset, kUnsetSize, FtraceFieldType::kInvalidFtraceFieldType,
+ "lwis_name", 5, ProtoSchemaType::kString,
+ TranslationStrategy::kInvalidTranslationStrategy},
+ {kUnsetOffset, kUnsetSize, FtraceFieldType::kInvalidFtraceFieldType,
+ "type", 6, ProtoSchemaType::kUint32,
+ TranslationStrategy::kInvalidTranslationStrategy},
+ {kUnsetOffset, kUnsetSize, FtraceFieldType::kInvalidFtraceFieldType,
+ "value", 7, ProtoSchemaType::kInt64,
+ TranslationStrategy::kInvalidTranslationStrategy},
+ },
+ kUnsetFtraceId,
+ 467,
+ kUnsetSize},
+ {"tracing_mark_write",
"mali",
{
{kUnsetOffset, kUnsetSize, FtraceFieldType::kInvalidFtraceFieldType,
diff --git a/src/traced/probes/ftrace/test/data/synthetic/events/lwis/tracing_mark_write/format b/src/traced/probes/ftrace/test/data/synthetic/events/lwis/tracing_mark_write/format
new file mode 100644
index 0000000..95c7e3f
--- /dev/null
+++ b/src/traced/probes/ftrace/test/data/synthetic/events/lwis/tracing_mark_write/format
@@ -0,0 +1,15 @@
+name: tracing_mark_write
+ID: 1473
+format:
+ field:unsigned short common_type; offset:0; size:2; signed:0;
+ field:unsigned char common_flags; offset:2; size:1; signed:0;
+ field:unsigned char common_preempt_count; offset:3; size:1; signed:0;
+ field:int common_pid; offset:4; size:4; signed:1;
+
+ field:char lwis_name[32]; offset:8; size:32; signed:0;
+ field:char type; offset:40; size:1; signed:0;
+ field:int pid; offset:44; size:4; signed:1;
+ field:__data_loc char[] func_name; offset:48; size:4; signed:0;
+ field:int64_t value; offset:56; size:8; signed:1;
+
+print fmt: "%c|%d|lwis-%s:%s|%lld", REC->type, REC->pid, REC->lwis_name, __get_str(func_name), REC->value