SWDEV-351980 - Acquire the code object lock in StatCO::getStatFuncName

Change-Id: I52ce2530d12fbe47e575feb2aab39bbfdfebd201


[ROCm/clr commit: a682934251]
This commit is contained in:
Laurent Morichetti
2022-08-16 08:38:56 -07:00
committed by Laurent Morichetti
parent 91a6c2da56
commit 2f467284bb
5 changed files with 8 additions and 5 deletions
+3 -1
View File
@@ -770,7 +770,9 @@ hipError_t StatCO::registerStatFunction(const void* hostFunction, Function* func
return hipSuccess;
}
const char* StatCO::getStatFuncName(const void* hostFunction) const {
const char* StatCO::getStatFuncName(const void* hostFunction) {
amd::ScopedLock lock(sclock_);
const auto it = functions_.find(hostFunction);
if (it == functions_.end()) {
return nullptr;