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:
parent
10af36c70a
commit
120b3244dc
|
@ -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
|
||||||
|
|
|
@ -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 = {};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue