Add TraceBuffer entry construction/destruction

Change-Id: I354f36b0d7a0baea0efb75d5e81f169b5f969542
This commit is contained in:
Laurent Morichetti
2022-07-26 16:04:20 -07:00
parent c588c49743
commit 2513f9f51f
3 changed files with 111 additions and 100 deletions
+2 -2
View File
@@ -62,8 +62,8 @@ int main() {
for (auto&& thread : threads) {
thread = std::thread([&trace_buffer]() {
for (std::size_t j = 0; j < num_iterations; ++j) {
auto* entry = trace_buffer.GetEntry();
entry->valid.store(roctracer::TRACE_ENTRY_COMPLETE, std::memory_order_release);
auto& entry = trace_buffer.Emplace();
entry.valid.store(roctracer::TRACE_ENTRY_COMPLETE, std::memory_order_release);
}
});
}