未验证 提交 98ac9294 编写于 作者: X Xin Pan 提交者: GitHub

Merge pull request #8782 from panyx0718/fix

Fix nullptr when doing nested profiling
......@@ -192,6 +192,12 @@ class DeviceTracerImpl : public DeviceTracer {
}
void AddCPURecords(const char *anno, uint64_t start_ns, uint64_t end_ns) {
if (!anno) {
// TODO(panyx0718): Currently, it doesn't support nested situation
// Up-level can be cleared by low-level and therefore get nullptr
// here.
return;
}
std::lock_guard<std::mutex> l(trace_mu_);
cpu_records_.push_back(
CPURecord{anno, start_ns, end_ns,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册