Cherry-pick CL 1250286 from SC stg.
HSA Finalizer: Add dumping of code object, ISA and executable to loader. This is controlled by loader options -dump-all, -dump-isa, -dump-code, -dump-exec The options can now also be set with env variable LOADER_OPTIONS_APPEND. Added tests to finalizer_offline Testing: smoke, dumping on hardware Reviewed by: Konstantin Zhuravlyov [git-p4: depot-paths = "//depot/stg/hsa/drivers/hsa/runtime/": change = 1255351]
Этот коммит содержится в:
@@ -230,6 +230,7 @@ public:
|
||||
|
||||
ExecutableImpl* Owner() const { return owner; }
|
||||
hsa_agent_t Agent() const { return agent; }
|
||||
virtual void Print(std::ostream& out) = 0;
|
||||
virtual void Destroy() = 0;
|
||||
|
||||
virtual ~ExecutableObject() { }
|
||||
@@ -260,6 +261,8 @@ public:
|
||||
void *data),
|
||||
void *data) override;
|
||||
|
||||
void Print(std::ostream& out) override;
|
||||
|
||||
void Destroy() override {}
|
||||
};
|
||||
|
||||
@@ -291,6 +294,7 @@ public:
|
||||
|
||||
bool IsAddressInSegment(uint64_t addr);
|
||||
void Copy(uint64_t addr, const void* src, size_t size);
|
||||
void Print(std::ostream& out) override;
|
||||
void Destroy() override;
|
||||
};
|
||||
|
||||
@@ -301,6 +305,7 @@ private:
|
||||
public:
|
||||
Sampler(ExecutableImpl *owner, hsa_agent_t agent, hsa_ext_sampler_t samp_)
|
||||
: ExecutableObject(owner, agent), samp(samp_) { }
|
||||
void Print(std::ostream& out) override;
|
||||
void Destroy() override;
|
||||
};
|
||||
|
||||
@@ -311,6 +316,7 @@ private:
|
||||
public:
|
||||
Image(ExecutableImpl *owner, hsa_agent_t agent, hsa_ext_image_t img_)
|
||||
: ExecutableObject(owner, agent), img(img_) { }
|
||||
void Print(std::ostream& out) override;
|
||||
void Destroy() override;
|
||||
};
|
||||
|
||||
@@ -395,6 +401,9 @@ public:
|
||||
|
||||
uint64_t FindHostAddress(uint64_t device_address) override;
|
||||
|
||||
void Print(std::ostream& out) override;
|
||||
bool PrintToFile(const std::string& filename) override;
|
||||
|
||||
Context* context() { return context_; }
|
||||
size_t id() { return id_; }
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user