Fixing rocprofilerv2 naming and CMake issues

Change-Id: Ib6d336349a056731e5c0f35151296d6fea671360


[ROCm/rocprofiler commit: dc69331379]
This commit is contained in:
Ammar ELWazir committed 2023-03-09 13:21:01 +00:00
1 parent 38080f727a
commit ff80dd4dfa
62 files changed
+228 -234237

No files matched your search

+4 -4
View File
@@ -1,8 +1,8 @@
= CTF plugin for ROCMTools
= CTF plugin for ROCProfiler
13 December 2022
Philippe Proulx
This plugin writes the received ROCMTools tracer and profiler records to
This plugin writes the received ROCProfiler tracer and profiler records to
a https://diamon.org/ctf/[CTF] trace.
== Build requirements
@@ -77,7 +77,7 @@ All CTF event records have the following common fields:
Correlation ID.
--
+
For each ROCMTools HSA API tracer record for the HSA function named
For each ROCProfiler HSA API tracer record for the HSA function named
`__name__`, this plugin writes two event records:
+
`__name___begin`:::
@@ -112,7 +112,7 @@ All CTF event records have the following common fields:
Kernel name (empty string if not available).
--
+
For each ROCMTools HIP API tracer record for the HIP function named
For each ROCProfiler HIP API tracer record for the HIP function named
`__name__`, this plugin writes two event records:
+
`__name__Begin`:::
+8 -8
View File
@@ -776,7 +776,7 @@ namespace {
constexpr std::uint64_t ns_per_s = 1'000'000'000ULL;
// Samples the ROCMTools clock and returns the value.
// Samples the ROCProfiler clock and returns the value.
std::uint64_t GetClkVal() {
rocprofiler_timestamp_t ts;
[[maybe_unused]] const auto ret = rocprofiler_get_timestamp(&ts);
@@ -786,16 +786,16 @@ std::uint64_t GetClkVal() {
}
// Updates `offset` and `delta`, if needed, to a more accurate clock
// class offset and a smaller ROCMTools clock value delta.
// class offset and a smaller ROCProfiler clock value delta.
//
// This function samples the ROCMTools clock twice, also sampling the
// real-time clock in between, and uses the average ROCMTools clock
// This function samples the ROCProfiler clock twice, also sampling the
// real-time clock in between, and uses the average ROCProfiler clock
// value to approximate the actual clock class offset.
//
// This strategy is based on the measure_single_clock_offset() function
// of the LTTng-tools project <https://lttng.org/>.
void UpdateClkClsOffsetAndDelta(std::uint64_t& offset, std::uint64_t& delta) {
// Sample ROCMTools clock (first time).
// Sample ROCProfiler clock (first time).
const auto rocm_clk_val1 = GetClkVal();
// Sample real-time clock.
@@ -804,10 +804,10 @@ void UpdateClkClsOffsetAndDelta(std::uint64_t& offset, std::uint64_t& delta) {
assert(ret == 0);
// Sample ROCMTools clock (second time).
// Sample ROCProfiler clock (second time).
const auto rocm_clk_val2 = GetClkVal();
// Compute the current ROCMTools clock value delta.
// Compute the current ROCProfiler clock value delta.
const auto this_delta = rocm_clk_val2 - rocm_clk_val1;
if (this_delta > delta) {
@@ -815,7 +815,7 @@ void UpdateClkClsOffsetAndDelta(std::uint64_t& offset, std::uint64_t& delta) {
return;
}
// Compute the average ROCMTools clock value.
// Compute the average ROCProfiler clock value.
const auto rocm_clk_val_avg = (rocm_clk_val1 + rocm_clk_val2) >> 1;
// Compute the real-time clock value in nanoseconds.