Skip to content

Commit

Permalink
Add binder_command and binder_return ftrace events
Browse files Browse the repository at this point in the history
Bug: 295124679
Change-Id: Ifcbd4f496f639e2554051424ba19be80050d63f2
  • Loading branch information
ddiproietto committed Sep 22, 2023
1 parent d0a7b97 commit 9d486c7
Show file tree
Hide file tree
Showing 6 changed files with 55 additions and 1 deletion.
6 changes: 6 additions & 0 deletions protos/perfetto/trace/ftrace/binder.proto
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,9 @@ message BinderTransactionAllocBufFtraceEvent {
optional uint64 offsets_size = 3;
optional uint64 extra_buffers_size = 4;
}
message BinderCommandFtraceEvent {
optional uint32 cmd = 1;
}
message BinderReturnFtraceEvent {
optional uint32 cmd = 1;
}
2 changes: 2 additions & 0 deletions protos/perfetto/trace/ftrace/ftrace_event.proto
Original file line number Diff line number Diff line change
Expand Up @@ -599,5 +599,7 @@ message FtraceEvent {
MaliMaliCSFINTERRUPTSTARTFtraceEvent mali_mali_CSF_INTERRUPT_START = 482;
MaliMaliCSFINTERRUPTENDFtraceEvent mali_mali_CSF_INTERRUPT_END = 483;
SamsungTracingMarkWriteFtraceEvent samsung_tracing_mark_write = 484;
BinderCommandFtraceEvent binder_command = 485;
BinderReturnFtraceEvent binder_return = 486;
}
}
8 changes: 8 additions & 0 deletions protos/perfetto/trace/perfetto_trace.proto
Original file line number Diff line number Diff line change
Expand Up @@ -5483,6 +5483,12 @@ message BinderTransactionAllocBufFtraceEvent {
optional uint64 offsets_size = 3;
optional uint64 extra_buffers_size = 4;
}
message BinderCommandFtraceEvent {
optional uint32 cmd = 1;
}
message BinderReturnFtraceEvent {
optional uint32 cmd = 1;
}

// End of protos/perfetto/trace/ftrace/binder.proto

Expand Down Expand Up @@ -9207,6 +9213,8 @@ message FtraceEvent {
MaliMaliCSFINTERRUPTSTARTFtraceEvent mali_mali_CSF_INTERRUPT_START = 482;
MaliMaliCSFINTERRUPTENDFtraceEvent mali_mali_CSF_INTERRUPT_END = 483;
SamsungTracingMarkWriteFtraceEvent samsung_tracing_mark_write = 484;
BinderCommandFtraceEvent binder_command = 485;
BinderReturnFtraceEvent binder_return = 486;
}
}

Expand Down
2 changes: 2 additions & 0 deletions src/tools/ftrace_proto_gen/event_list
Original file line number Diff line number Diff line change
Expand Up @@ -479,3 +479,5 @@ synthetic/suspend_resume_minimal
mali/mali_CSF_INTERRUPT_START
mali/mali_CSF_INTERRUPT_END
samsung/tracing_mark_write
binder/binder_command
binder/binder_return
18 changes: 17 additions & 1 deletion src/trace_processor/importers/ftrace/ftrace_descriptors.cc
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ namespace perfetto {
namespace trace_processor {
namespace {

std::array<FtraceMessageDescriptor, 485> descriptors{{
std::array<FtraceMessageDescriptor, 487> descriptors{{
{nullptr, 0, {}},
{nullptr, 0, {}},
{nullptr, 0, {}},
Expand Down Expand Up @@ -5335,6 +5335,22 @@ std::array<FtraceMessageDescriptor, 485> descriptors{{
{"value", ProtoSchemaType::kInt32},
},
},
{
"binder_command",
1,
{
{},
{"cmd", ProtoSchemaType::kUint32},
},
},
{
"binder_return",
1,
{
{},
{"cmd", ProtoSchemaType::kUint32},
},
},
}};

} // namespace
Expand Down
20 changes: 20 additions & 0 deletions src/traced/probes/ftrace/event_info.cc
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,26 @@ std::vector<Event> GetStaticEventInfo() {
kUnsetFtraceId,
323,
kUnsetSize},
{"binder_command",
"binder",
{
{kUnsetOffset, kUnsetSize, FtraceFieldType::kInvalidFtraceFieldType,
"cmd", 1, ProtoSchemaType::kUint32,
TranslationStrategy::kInvalidTranslationStrategy},
},
kUnsetFtraceId,
485,
kUnsetSize},
{"binder_return",
"binder",
{
{kUnsetOffset, kUnsetSize, FtraceFieldType::kInvalidFtraceFieldType,
"cmd", 1, ProtoSchemaType::kUint32,
TranslationStrategy::kInvalidTranslationStrategy},
},
kUnsetFtraceId,
486,
kUnsetSize},
{"block_rq_issue",
"block",
{
Expand Down

0 comments on commit 9d486c7

Please sign in to comment.