Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't exchange zet/zes DDI tables for tracing #172

Merged
Show file tree
Hide file tree
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: 1 addition & 5 deletions source/lib/ze_lib.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ namespace ze_lib
// Init the stored ddi tables for the tracing layer
if( ZE_RESULT_SUCCESS == result )
{
result = zelLoaderTracingLayerInit(this->pTracingZeDdiTable, this->pTracingZetDdiTable, this->pTracingZesDdiTable);
result = zelLoaderTracingLayerInit(this->pTracingZeDdiTable);
}
// End DDI Table Inits

Expand Down Expand Up @@ -167,8 +167,6 @@ zelEnableTracingLayer()
{
if (ze_lib::context->tracingLayerEnableCounter.fetch_add(1) == 0) {
ze_lib::context->zeDdiTable.exchange(ze_lib::context->pTracingZeDdiTable);
ze_lib::context->zetDdiTable.exchange(ze_lib::context->pTracingZetDdiTable);
ze_lib::context->zesDdiTable.exchange(ze_lib::context->pTracingZesDdiTable);
}
return ZE_RESULT_SUCCESS;
}
Expand All @@ -178,8 +176,6 @@ zelDisableTracingLayer()
{
if (ze_lib::context->tracingLayerEnableCounter.fetch_sub(1) <= 1) {
ze_lib::context->zeDdiTable.exchange(&ze_lib::context->initialzeDdiTable);
ze_lib::context->zetDdiTable.exchange(&ze_lib::context->initialzetDdiTable);
ze_lib::context->zesDdiTable.exchange(&ze_lib::context->initialzesDdiTable);
}
return ZE_RESULT_SUCCESS;
}
Expand Down
2 changes: 0 additions & 2 deletions source/lib/ze_lib.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,6 @@ namespace ze_lib
ze_result_t zelTracingDdiTableInit();
zel_tracing_dditable_t zelTracingDdiTable = {};
std::atomic<ze_dditable_t *> pTracingZeDdiTable = {nullptr};
std::atomic<zet_dditable_t *> pTracingZetDdiTable = {nullptr};
std::atomic<zes_dditable_t *> pTracingZesDdiTable = {nullptr};
ze_dditable_t initialzeDdiTable;
zet_dditable_t initialzetDdiTable;
zes_dditable_t initialzesDdiTable;
Expand Down
6 changes: 2 additions & 4 deletions source/loader/ze_loader_api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,11 @@ zeLoaderGetTracingHandle()
}

///////////////////////////////////////////////////////////////////////////////
/// @brief Internal function for Setting the ddi tables for the Tracing Layer.
/// @brief Internal function for Setting the ddi table for the Tracing Layer.
///
ZE_DLLEXPORT ze_result_t ZE_APICALL
zelLoaderTracingLayerInit(std::atomic<ze_dditable_t *> &zeDdiTable, std::atomic<zet_dditable_t *> &zetDdiTable, std::atomic<zes_dditable_t *> &zesDdiTable) {
zelLoaderTracingLayerInit(std::atomic<ze_dditable_t *> &zeDdiTable) {
zeDdiTable.store(&loader::context->tracing_dditable.ze);
zetDdiTable.store(&loader::context->tracing_dditable.zet);
zesDdiTable.store(&loader::context->tracing_dditable.zes);
return ZE_RESULT_SUCCESS;
}

Expand Down
4 changes: 2 additions & 2 deletions source/loader/ze_loader_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ zelLoaderDriverCheck(ze_init_flags_t flags);


///////////////////////////////////////////////////////////////////////////////
/// @brief Internal function for Setting the ddi tables for the Tracing Layer.
/// @brief Internal function for Setting the ddi table for the Tracing Layer.
///
ZE_DLLEXPORT ze_result_t ZE_APICALL
zelLoaderTracingLayerInit(std::atomic<ze_dditable_t *> &zeDdiTable, std::atomic<zet_dditable_t *> &zetDdiTable, std::atomic<zes_dditable_t *> &zesDdiTable);
zelLoaderTracingLayerInit(std::atomic<ze_dditable_t *> &zeDdiTable);


///////////////////////////////////////////////////////////////////////////////
Expand Down
Loading