From e3ed1a52bcd366fc08ab20969d971788a2d13d2a Mon Sep 17 00:00:00 2001 From: Kevin Huck Date: Mon, 17 Jun 2024 15:58:23 -0700 Subject: [PATCH] Fixing multiple parent build error --- src/apex/perfetto_listener.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/apex/perfetto_listener.cpp b/src/apex/perfetto_listener.cpp index 04686aa4..0debb6ed 100644 --- a/src/apex/perfetto_listener.cpp +++ b/src/apex/perfetto_listener.cpp @@ -124,12 +124,16 @@ void perfetto_listener::on_exit_thread(event_data &data) { inline bool perfetto_listener::_common_start(std::shared_ptr &tt_ptr) { APEX_UNUSED(tt_ptr); + uint64_t pguid = tt_ptr->guid; + if (tt_ptr->parents[0] != nullptr) { + pguid = tt_ptr->parents[0]->guid; + } TRACE_EVENT_BEGIN(_category, perfetto::DynamicString{tt_ptr->get_task_id()->get_name()}, //perfetto::ProcessTrack::Current(), (uint64_t)tt_ptr->prof->get_start_ns(), _guid, tt_ptr->guid, - _pguid, tt_ptr->parent_guid[0]); + _pguid, pguid); return true; } @@ -202,8 +206,8 @@ void perfetto_listener::on_async_event(base_thread_node &node, std::shared_ptr &p, const async_event_data& data) { const size_t tid{make_tid(node)}; uint64_t pguid = 0; - if (p->tt_ptr != nullptr && p->tt_ptr->parent != nullptr) { - pguid = p->tt_ptr->parent->guid; + if (p->tt_ptr != nullptr && p->tt_ptr->parents[0] != nullptr) { + pguid = p->tt_ptr->parents[0]->guid; } TRACE_EVENT_BEGIN(_category, perfetto::DynamicString{p->get_task_id()->get_name()},