diff --git a/projects/rocprofiler/README.md b/projects/rocprofiler/README.md index 75fd98b2d4..239ee5f180 100644 --- a/projects/rocprofiler/README.md +++ b/projects/rocprofiler/README.md @@ -676,6 +676,8 @@ Please report in the Github Issues. ``` Recommended: "profile_standard" for counter collection and "auto" for all other profiling. Use rocm-smi to verify the current power state. For multiGPU systems (includes integrated graphics), replace "card0" by the desired card. +- Timestamps may be incorrect with HIP_OPS when the system has been in sleep state. +- HIP_OPS are mutually exclusive with HSA_OPS. ## Supported AMD GPU Architectures (V2) diff --git a/projects/rocprofiler/src/core/activity.cpp b/projects/rocprofiler/src/core/activity.cpp index 61de615b3b..3bd753e761 100644 --- a/projects/rocprofiler/src/core/activity.cpp +++ b/projects/rocprofiler/src/core/activity.cpp @@ -40,7 +40,7 @@ THE SOFTWARE. #define PUBLIC_API __attribute__((visibility("default"))) // Error handler -void fatal(const std::string msg) { +void fatal(const std::string msg) [[noreturn]] { fflush(stdout); fprintf(stderr, "%s\n\n", msg.c_str()); fflush(stderr); diff --git a/projects/rocprofiler/src/tools/tool.cpp b/projects/rocprofiler/src/tools/tool.cpp index f450c8a118..2791490999 100644 --- a/projects/rocprofiler/src/tools/tool.cpp +++ b/projects/rocprofiler/src/tools/tool.cpp @@ -686,11 +686,11 @@ ROCPROFILER_EXPORT bool OnLoad(void* table, uint64_t runtime_version, uint64_t f std::vector apis_requested; if (getenv("ROCPROFILER_HIP_API_TRACE")) apis_requested.emplace_back(ACTIVITY_DOMAIN_HIP_API); - if (getenv("ROCPROFILER_HIP_ACTIVITY_TRACE")) - apis_requested.emplace_back(ACTIVITY_DOMAIN_HIP_OPS); if (getenv("ROCPROFILER_HSA_API_TRACE")) apis_requested.emplace_back(ACTIVITY_DOMAIN_HSA_API); if (getenv("ROCPROFILER_HSA_ACTIVITY_TRACE")) apis_requested.emplace_back(ACTIVITY_DOMAIN_HSA_OPS); + else if (getenv("ROCPROFILER_HIP_ACTIVITY_TRACE")) + apis_requested.emplace_back(ACTIVITY_DOMAIN_HIP_OPS); if (getenv("ROCPROFILER_ROCTX_TRACE")) apis_requested.emplace_back(ACTIVITY_DOMAIN_ROCTX); // ATT Parameters diff --git a/projects/rocprofiler/test/app/intercept_test.cpp b/projects/rocprofiler/test/app/intercept_test.cpp index bdf2aef608..cc383e91d6 100644 --- a/projects/rocprofiler/test/app/intercept_test.cpp +++ b/projects/rocprofiler/test/app/intercept_test.cpp @@ -46,7 +46,7 @@ volatile bool is_loaded = false; // unsigned feature_count = 0; // Error handler -void fatal(const std::string msg) { +void fatal(const std::string msg) [[noreturn]] { fflush(stdout); fprintf(stderr, "%s\n\n", msg.c_str()); fflush(stderr); diff --git a/projects/rocprofiler/test/app/stand_intercept_test.cpp b/projects/rocprofiler/test/app/stand_intercept_test.cpp index e7d83bc388..ad8c62594e 100644 --- a/projects/rocprofiler/test/app/stand_intercept_test.cpp +++ b/projects/rocprofiler/test/app/stand_intercept_test.cpp @@ -39,7 +39,7 @@ THE SOFTWARE. pthread_mutex_t mutex = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP; // Error handler -void fatal(const std::string msg) { +void fatal(const std::string msg) [[noreturn]] { fflush(stdout); fprintf(stderr, "%s\n\n", msg.c_str()); fflush(stderr); diff --git a/projects/rocprofiler/test/tool/tool.cpp b/projects/rocprofiler/test/tool/tool.cpp index f132fba9ca..268771658a 100644 --- a/projects/rocprofiler/test/tool/tool.cpp +++ b/projects/rocprofiler/test/tool/tool.cpp @@ -159,7 +159,7 @@ static inline uint32_t GetTid() { return syscall(__NR_gettid); } uint32_t my_pid = GetPid(); // Error handler -void fatal(const std::string msg) { +void fatal(const std::string msg) [[noreturn]] { fflush(stdout); fprintf(stderr, "%s\n\n", msg.c_str()); fflush(stderr);