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

Change-Id: I52ce2530d12fbe47e575feb2aab39bbfdfebd201


[ROCm/clr commit: a682934251]
Этот коммит содержится в:
Laurent Morichetti
2022-08-16 08:38:56 -07:00
коммит произвёл Laurent Morichetti
родитель 91a6c2da56
Коммит 2f467284bb
5 изменённых файлов: 8 добавлений и 5 удалений
+3 -1
Просмотреть файл
@@ -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;
+1 -1
Просмотреть файл
@@ -139,7 +139,7 @@ public:
hipError_t registerStatManagedVar(Var *var);
//Retrive Vars/Funcs for a given hostSidePtr(const void*), unless stated otherwise.
const char* getStatFuncName(const void* hostFunction) const;
const char* getStatFuncName(const void* hostFunction);
hipError_t getStatFunc(hipFunction_t* hfunc, const void* hostFunction, int deviceId);
hipError_t getStatFuncAttr(hipFuncAttributes* func_attr, const void* hostFunction, int deviceId);
hipError_t getStatGlobalVar(const void* hostVar, int deviceId, hipDeviceptr_t* dev_ptr,
+2 -1
Просмотреть файл
@@ -41,7 +41,8 @@ int hipGetStreamDeviceId(hipStream_t stream) {
return (s != nullptr)? s->DeviceId() : ihipGetDevice();
}
const char* hipKernelNameRefByPtr(const void* hostFunction, hipStream_t) {
const char* hipKernelNameRefByPtr(const void* hostFunction, hipStream_t stream) {
[](auto&&...){}(stream);
if (hostFunction == nullptr) {
return nullptr;
}
+1 -1
Просмотреть файл
@@ -893,7 +893,7 @@ hipError_t PlatformState::registerStatManagedVar(hip::Var* var) {
return statCO_.registerStatManagedVar(var);
}
const char* PlatformState::getStatFuncName(const void* hostFunction) const {
const char* PlatformState::getStatFuncName(const void* hostFunction) {
return statCO_.getStatFuncName(hostFunction);
}
+1 -1
Просмотреть файл
@@ -74,7 +74,7 @@ class PlatformState {
hipError_t registerStatGlobalVar(const void* hostVar, hip::Var* var);
hipError_t registerStatManagedVar(hip::Var* var);
const char* getStatFuncName(const void* hostFunction) const;
const char* getStatFuncName(const void* hostFunction);
hipError_t getStatFunc(hipFunction_t* hfunc, const void* hostFunction, int deviceId);
hipError_t getStatFuncAttr(hipFuncAttributes* func_attr, const void* hostFunction, int deviceId);
hipError_t getStatGlobalVar(const void* hostVar, int deviceId, hipDeviceptr_t* dev_ptr,