SWDEV-351980 - Acquire the code object lock in StatCO::getStatFuncName
Change-Id: I52ce2530d12fbe47e575feb2aab39bbfdfebd201
[ROCm/clr commit: a682934251]
Этот коммит содержится в:
коммит произвёл
Laurent Morichetti
родитель
91a6c2da56
Коммит
2f467284bb
@@ -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;
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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,
|
||||
|
||||
Ссылка в новой задаче
Block a user