Skip to content

Commit

Permalink
Merge pull request #2083 from kswiecicki/xpti-init-fix
Browse files Browse the repository at this point in the history
Fix XPTI initialization bug
  • Loading branch information
pbalcer authored and omarahmed1111 committed Sep 12, 2024
1 parent 637344c commit ea5037c
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions source/loader/layers/tracing/ur_tracing_layer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,15 @@ struct XptiContextManager {
~XptiContextManager() { xptiFrameworkFinalize(); }
};

static std::shared_ptr<XptiContextManager> xptiContextManagerGlobal = [] {
return std::make_shared<XptiContextManager>();
}();
static std::shared_ptr<XptiContextManager> xptiContextManagerGet() {
static auto contextManager = std::make_shared<XptiContextManager>();
return contextManager;
};
static thread_local xpti_td *activeEvent;

///////////////////////////////////////////////////////////////////////////////
context_t::context_t() : logger(logger::create_logger("tracing", true, true)) {
this->xptiContextManager = xptiContextManagerGlobal;
this->xptiContextManager = xptiContextManagerGet();

call_stream_id = xptiRegisterStream(CALL_STREAM_NAME);
std::ostringstream streamv;
Expand Down

0 comments on commit ea5037c

Please sign in to comment.