Merge pull request #31 from whchung/feature-roctracer_get_timestamp
[Feature] Introduce a new API roctracer_get_timestamp().
[ROCm/roctracer commit: e212670fe8]
This commit is contained in:
@@ -225,6 +225,10 @@ bool roctracer_load(
|
||||
|
||||
void roctracer_unload(bool destruct);
|
||||
|
||||
// Get system timestamp.
|
||||
roctracer_status_t roctracer_get_timestamp(
|
||||
uint64_t* timestamp);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C" block
|
||||
#endif // __cplusplus
|
||||
|
||||
@@ -1119,6 +1119,12 @@ PUBLIC_API void roctracer_unload(bool destruct) {
|
||||
ONLOAD_TRACE_END();
|
||||
}
|
||||
|
||||
PUBLIC_API roctracer_status_t roctracer_get_timestamp(uint64_t* timestamp) {
|
||||
API_METHOD_PREFIX
|
||||
*timestamp = util::HsaRsrcFactory::Instance().TimestampNs();
|
||||
API_METHOD_SUFFIX
|
||||
}
|
||||
|
||||
PUBLIC_API bool OnLoad(HsaApiTable* table, uint64_t runtime_version, uint64_t failed_tool_count,
|
||||
const char* const* failed_tool_names) {
|
||||
ONLOAD_TRACE_BEG();
|
||||
|
||||
Reference in New Issue
Block a user