update: dlopen of target runtimes with NOLOAD; enabled KFD domain in explicite test

[ROCm/roctracer commit: f2b6a6b35c]
This commit is contained in:
Evgeny
2019-11-13 11:57:17 -06:00
parent ef8e18a97c
commit e3302e07a6
3 changed files with 5 additions and 1 deletions
+1
View File
@@ -8,6 +8,7 @@ b
build
inc/hsa_prof_str.h
inc/kfd_prof_str.h
inc/kfd_ostream_ops.h
test/hsa
test/MatrixTranspose/MatrixTranspose
test/MatrixTranspose_test/MatrixTranspose
+1 -1
View File
@@ -46,7 +46,7 @@ class BaseLoader : public T {
private:
BaseLoader() {
const int flags = RTLD_LAZY;
const int flags = RTLD_LAZY|RTLD_NOLOAD;
handle_ = dlopen(lib_name_, flags);
if (handle_ == NULL) {
fprintf(stderr, "roctracer: Loading '%s' failed, %s\n", lib_name_, dlerror());
@@ -314,6 +314,8 @@ void init_tracing() {
// Enable HIP activity tracing
ROCTRACER_CALL(roctracer_enable_domain_activity(ACTIVITY_DOMAIN_HIP_API));
ROCTRACER_CALL(roctracer_enable_domain_activity(ACTIVITY_DOMAIN_HCC_OPS));
// Enable KFD API tracing
ROCTRACER_CALL(roctracer_enable_domain_activity(ACTIVITY_DOMAIN_KFD_API));
}
// Start tracing routine
@@ -329,6 +331,7 @@ void stop_tracing() {
ROCTRACER_CALL(roctracer_disable_domain_callback(ACTIVITY_DOMAIN_HIP_API));
ROCTRACER_CALL(roctracer_disable_domain_activity(ACTIVITY_DOMAIN_HIP_API));
ROCTRACER_CALL(roctracer_disable_domain_activity(ACTIVITY_DOMAIN_HCC_OPS));
ROCTRACER_CALL(roctracer_disable_domain_activity(ACTIVITY_DOMAIN_KFD_API));
ROCTRACER_CALL(roctracer_flush_activity());
std::cout << "# STOP #############################" << std::endl << std::flush;
}