mirror of
https://gitee.com/openharmony/developtools_profiler
synced 2024-11-23 15:00:17 +00:00
commit
c8552eacb8
@ -23,6 +23,13 @@ template <typename T> void sched_blocked_reason_func(T& msg, uint8_t data[], siz
|
|||||||
msg->set_pid(FtraceFieldParser::ParseIntField<int32_t>(format.fields, i++, data, size));
|
msg->set_pid(FtraceFieldParser::ParseIntField<int32_t>(format.fields, i++, data, size));
|
||||||
msg->set_caller(FtraceFieldParser::ParseIntField<uint64_t>(format.fields, i++, data, size));
|
msg->set_caller(FtraceFieldParser::ParseIntField<uint64_t>(format.fields, i++, data, size));
|
||||||
msg->set_io_wait(FtraceFieldParser::ParseIntField<uint32_t>(format.fields, i++, data, size));
|
msg->set_io_wait(FtraceFieldParser::ParseIntField<uint32_t>(format.fields, i++, data, size));
|
||||||
|
uint64_t recOffset = FtraceFieldParser::ParseIntField<uint64_t>(format.fields, ++i, data, size);
|
||||||
|
uint64_t recSize = FtraceFieldParser::ParseIntField<uint64_t>(format.fields, ++i, data, size);
|
||||||
|
std::string funcName = FtraceFieldParser::ParseStrField(format.fields, ++i, data, size);
|
||||||
|
std::string modName = FtraceFieldParser::ParseStrField(format.fields, ++i, data, size);
|
||||||
|
std::string caller_str = funcName + "+0x" + std::to_string(recOffset) + "/0x"
|
||||||
|
+ std::to_string(recSize) + "[" + modName + "]";
|
||||||
|
msg->set_caller_str(caller_str);
|
||||||
}
|
}
|
||||||
REGISTER_FTRACE_EVENT_PARSE_FUNCTION(sched_blocked_reason,
|
REGISTER_FTRACE_EVENT_PARSE_FUNCTION(sched_blocked_reason,
|
||||||
[](FtraceEvent& ftraceEvent, uint8_t data[], size_t size, const EventFormat& format) {
|
[](FtraceEvent& ftraceEvent, uint8_t data[], size_t size, const EventFormat& format) {
|
||||||
|
@ -23,6 +23,7 @@ message SchedBlockedReasonFormat {
|
|||||||
int32 pid = 1;
|
int32 pid = 1;
|
||||||
uint64 caller = 2;
|
uint64 caller = 2;
|
||||||
uint32 io_wait = 3;
|
uint32 io_wait = 3;
|
||||||
|
string caller_str = 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
// /sys/kernel/debug/tracing/events/sched/sched_kthread_stop/format
|
// /sys/kernel/debug/tracing/events/sched/sched_kthread_stop/format
|
||||||
|
Loading…
Reference in New Issue
Block a user