Skip to content

Commit 42763b3

Browse files
Merge commit '0c080f6c4619239c2ccfe615f8dfc4432b0330ea' into import/develop/bertwesarg_rocprofiler-sdk/otf-systree
2 parents 4d21b81 + 0c080f6 commit 42763b3

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

projects/rocprofiler-sdk/source/lib/output/generateOTF2.cpp

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -831,6 +831,9 @@ write_otf2(const output_config& cfg,
831831
OTF2_CHECK(OTF2_GlobalDefWriter_WriteSystemTreeNode(
832832
global_def_writer, 0, _exe_hash, _node_hash, OTF2_UNDEFINED_SYSTEM_TREE_NODE));
833833

834+
OTF2_CHECK(OTF2_GlobalDefWriter_WriteSystemTreeNode(
835+
global_def_writer, 0, OTF2_SYSTEM_TREE_DOMAIN_SHARED_MEMORY ));
836+
834837
// Process
835838
OTF2_CHECK(OTF2_GlobalDefWriter_WriteLocationGroup(global_def_writer,
836839
0,
@@ -846,12 +849,23 @@ write_otf2(const output_config& cfg,
846849
auto _hash = get_hash_id(_name);
847850

848851
add_write_string(_hash, _name);
852+
853+
/* the device */
854+
OTF2_CHECK(OTF2_GlobalDefWriter_WriteSystemTreeNode(
855+
global_def_writer, agent_v.id.handle, _hash, 0, 0));
856+
857+
/* the device is an accelerator */
858+
OTF2_CHECK(OTF2_GlobalDefWriter_WriteSystemTreeNode(
859+
global_def_writer, agent_v.id.handle, OTF2_SYSTEM_TREE_DOMAIN_ACCELERATOR_DEVICE ));
860+
861+
/* the context */
849862
OTF2_CHECK(OTF2_GlobalDefWriter_WriteLocationGroup(global_def_writer,
850863
agent_v.id.handle,
851864
_hash,
852865
OTF2_LOCATION_GROUP_TYPE_ACCELERATOR,
853-
0,
854-
OTF2_UNDEFINED_LOCATION_GROUP));
866+
agent_v.id.handle, // system tree node (aka the device)
867+
0 // creating/controlling process
868+
));
855869
}
856870

857871
// Thread Events

0 commit comments

Comments
 (0)