Skip to content

Commit

Permalink
Debugging async events with HIP. Apparently the nvhpc 22.11 compiler …
Browse files Browse the repository at this point in the history
…crashes when compiling the perfetto.cc file.
  • Loading branch information
khuck committed Dec 31, 2022
1 parent 5202df8 commit b0a921e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/apex/hip_trace.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ using namespace std;
#include "address_resolution.hpp"
#endif
#include "async_thread_node.hpp"
#include "perfetto.hpp"
#include "perfetto_listener.hpp"
#include "trace_event_listener.hpp"
#ifdef APEX_HAVE_OTF2
#include "otf2_listener.hpp"
Expand Down
5 changes: 4 additions & 1 deletion src/apex/perfetto_listener.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ perfetto_listener::perfetto_listener (void) {
// recording. In this example we just need the "track_event" data source,
// which corresponds to the TRACE_EVENT trace points.
perfetto::TraceConfig cfg;
cfg.add_buffers()->set_size_kb(1024);
cfg.add_buffers()->set_size_kb(2048);
auto* ds_cfg = cfg.add_data_sources()->mutable_config();
ds_cfg->set_name("track_event");
tracing_session = perfetto::Tracing::NewTrace();
Expand Down Expand Up @@ -180,6 +180,9 @@ size_t perfetto_listener::make_tid (base_thread_node &node) {
if (vthread_map.count(node) == 0) {
uint32_t id_shifted = node.sortable_tid();
vthread_map.insert(std::pair<base_thread_node, size_t>(node,id_shifted));
auto desc = perfetto::Track(id_shifted).Serialize();
desc.set_name(node.name());
perfetto::TrackEvent::SetTrackDescriptor(perfetto::Track(id_shifted), desc);
}
tid = vthread_map[node];
_vthread_mutex.unlock();
Expand Down

0 comments on commit b0a921e

Please sign in to comment.