Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion libkineto/src/init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,12 @@ static bool initialized = false;

static void initProfilers() {
if (!initialized) {
// Caution: `initProfilerIfRegistered` spawns the `updateConfigThread`, so
// either:
// 1. Ensure nothing the main thread does not do anything which could race
// with the `updateConfigThread` (current invariant)
// 2. Guard the raceable data appropriately
libkineto::api().initProfilerIfRegistered();
libkineto::api().configLoader().initBaseConfig();
initialized = true;
VLOG(0) << "libkineto profilers activated";
}
Expand Down
Loading