Ocl Performance Counters: proper cleanup of metrics library query object.

To avoid a case when deleted query could be reused.
Added also transition from libigdml.so to libigdml.so.1
Signed-off-by: Piotr Maciejewski <piotr.mciejewski@intel.com>
This commit is contained in:
Piotr Maciejewski 2021-03-17 10:03:24 +00:00 committed by Compute-Runtime-Automation
parent 10af36c70a
commit 120b3244dc
2 changed files with 4 additions and 2 deletions

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2017-2020 Intel Corporation * Copyright (C) 2017-2021 Intel Corporation
* *
* SPDX-License-Identifier: MIT * SPDX-License-Identifier: MIT
* *
@ -20,5 +20,5 @@ const char *pciDevicesDirectory = "/dev/dri/by-path";
const char *sysFsProcPathPrefix = "/proc"; const char *sysFsProcPathPrefix = "/proc";
// Metrics Library name // Metrics Library name
const char *metricsLibraryDllName = "libigdml.so"; const char *metricsLibraryDllName = "libigdml.so.1";
} // namespace Os } // namespace Os

View File

@ -127,11 +127,13 @@ void PerformanceCounters::closeMetricsLibrary() {
// Destroy hw counters query. // Destroy hw counters query.
if (query.IsValid()) { if (query.IsValid()) {
metricsLibrary->hwCountersDelete(query); metricsLibrary->hwCountersDelete(query);
query = {};
} }
// Destroy metrics library context. // Destroy metrics library context.
if (context.IsValid()) { if (context.IsValid()) {
metricsLibrary->contextDelete(context); metricsLibrary->contextDelete(context);
context = {};
} }
} }