-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve the timeline profiler #8775
Conversation
smaller binary proto avoid untrackable kernel
} | ||
|
||
void AddMemRecords(const std::string &name, uint64_t start_ns, | ||
uint64_t end_ns, uint32_t device_id, uint32_t stream_id, | ||
uint32_t correlation_id, uint64_t bytes) { | ||
// 0 means timestamp information could not be collected for the kernel. | ||
if (start_ns == 0 || end_ns == 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add a log here?
mem_records_.push_back(MemRecord{name, start_ns, end_ns, device_id, | ||
stream_id, correlation_id, bytes}); | ||
} | ||
|
||
void AddKernelRecords(uint64_t start, uint64_t end, uint32_t device_id, | ||
uint32_t stream_id, uint32_t correlation_id) { | ||
// 0 means timestamp information could not be collected for the kernel. | ||
if (start == 0 || end == 0) { | ||
LOG(WARNING) << correlation_id << " cannot be traced"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please use
VLOG(level) << ...;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Use binary instead of text format
Avoid kernels that cannot be traced.