rocprofv3: Updates to counter collection optimizations (#24)

* Updates to counter collection optimizations

* Fix logic error

---------

Co-authored-by: Jonathan R. Madsen <jonathanrmadsen@gmail.com>
此提交包含在:
Madsen, Jonathan
2024-12-06 17:29:12 -06:00
提交者 GitHub
父節點 5556774c3a
當前提交 a09eda05b2
共有 6 個檔案被更改,包括 103 行新增 和 62 行删除
+8 -2
查看文件
@@ -106,10 +106,16 @@ offload_buffer(domain_type type)
auto _lk = std::lock_guard<std::mutex>(filebuf->file.file_mutex);
[[maybe_unused]] static auto _success = filebuf->file.open();
auto& _fs = filebuf->file.stream;
filebuf->file.file_pos.emplace(_fs.tellg());
ROCP_CI_LOG_IF(WARNING, _fs.tellg() != _fs.tellp()) // this should always be true
<< "tellg=" << _fs.tellg() << ", tellp=" << _fs.tellp();
filebuf->file.file_pos.emplace(_fs.tellp());
filebuf->buffer.save(_fs);
filebuf->buffer.clear();
CHECK(filebuf->buffer.is_empty() == true);
ROCP_CI_LOG_IF(ERROR, !filebuf->buffer.is_empty())
<< "buffer is not empty after offload: count=" << filebuf->buffer.count();
}
template <typename Tp>