Skip to content

Commit

Permalink
Move kfd_api_trace_entry_t to roctracer_trace_entries.h
Browse files Browse the repository at this point in the history
  • Loading branch information
yoann-heitz committed Sep 23, 2021
1 parent abbab33 commit b3a0781
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
13 changes: 13 additions & 0 deletions inc/roctracer_trace_entries.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include <roctracer_roctx.h>
#include <roctracer_hsa.h>
#include <roctracer_hip.h>
#include <roctracer_kfd.h>
#include <ext/prof_protocol.h>
#include <ext/hsa_rt_utils.hpp>

Expand Down Expand Up @@ -73,4 +74,16 @@ struct hip_activity_trace_entry_t {
uint32_t pid;
};

struct kfd_api_trace_entry_t {
std::atomic<uint32_t> valid;
roctracer::entry_type_t type;
uint32_t domain;
uint32_t cid;
timestamp_t begin;
timestamp_t end;
uint32_t pid;
uint32_t tid;
kfd_api_data_t data;
};

#endif
12 changes: 0 additions & 12 deletions test/tool/tracer_tool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -665,18 +665,6 @@ void pool_activity_callback(const char* begin, const char* end, void* arg) {
///////////////////////////////////////////////////////////////////////////////////////////////////////
// KFD API tracing

struct kfd_api_trace_entry_t {
std::atomic<uint32_t> valid;
roctracer::entry_type_t type;
uint32_t domain;
uint32_t cid;
timestamp_t begin;
timestamp_t end;
uint32_t pid;
uint32_t tid;
kfd_api_data_t data;
};

void kfd_api_flush_cb(kfd_api_trace_entry_t* entry);
constexpr roctracer::TraceBuffer<kfd_api_trace_entry_t>::flush_prm_t kfd_api_flush_prm = {roctracer::DFLT_ENTRY_TYPE, kfd_api_flush_cb};
roctracer::TraceBuffer<kfd_api_trace_entry_t>* kfd_api_trace_buffer = NULL;
Expand Down

0 comments on commit b3a0781

Please sign in to comment.