Skip to content

Commit

Permalink
Fixing multi-parent OTF2 bug
Browse files Browse the repository at this point in the history
  • Loading branch information
khuck committed Aug 21, 2024
1 parent ae5c831 commit 1509477
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions src/apex/otf2_listener.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1228,11 +1228,9 @@ namespace apex {
OTF2_AttributeList * al = OTF2_AttributeList_New();
// create an attribute
OTF2_AttributeList_AddUint64( al, 0, tt_ptr->guid );
std::vector<uint64_t> pguids = {};
for (auto& parent : tt_ptr->parents) {
pguids.push_back(parent->guid);
OTF2_AttributeList_AddUint64( al, 1, parent->guid );
}
OTF2_AttributeList_AddUint64( al, pguids.size(), pguids.data() );
uint64_t idx = get_region_index(id);
uint64_t stamp = 0L;
if (thread_instance::get_id() == 0) {
Expand Down Expand Up @@ -1287,11 +1285,9 @@ namespace apex {
OTF2_AttributeList * al = OTF2_AttributeList_New();
// create an attribute
OTF2_AttributeList_AddUint64( al, 0, p->tt_ptr->guid );
std::vector<uint64_t> pguids = {};
for (auto& parent : tt_ptr->parents) {
pguids.push_back(parent->guid);
for (auto& parent : p->tt_ptr->parents) {
OTF2_AttributeList_AddUint64( al, 1, parent->guid );
}
OTF2_AttributeList_AddUint64( al, pguids.size(), pguids.data() );
// unfortunately, we can't use the timestamp from the
// profiler object. bummer. it has to be taken after
// the lock is acquired, so that events happen on
Expand Down Expand Up @@ -2752,11 +2748,9 @@ namespace apex {
OTF2_AttributeList * al = OTF2_AttributeList_New();
// create an attribute
OTF2_AttributeList_AddUint64( al, 0, p->tt_ptr->guid );
std::vector<uint64_t> pguids = {};
for (auto& parent : tt_ptr->parents) {
pguids.push_back(parent->guid);
for (auto& parent : p->tt_ptr->parents) {
OTF2_AttributeList_AddUint64( al, 1, parent->guid );
}
OTF2_AttributeList_AddUint64( al, pguids.size(), pguids.data() );
OTF2_EC(OTF2_EvtWriter_Enter( local_evt_writer, al,
stamp, idx /* region */ ));
stamp = p->get_stop_ns() - globalOffset;
Expand Down

0 comments on commit 1509477

Please sign in to comment.