Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
7e8546c
feat(pmc): add policy-based PMC collectors for GPU and NIC metrics
adjordje-amd Mar 12, 2026
3710324
fix(pmc): improve performance and fix CMake for GPU/NIC collectors
adjordje-amd Mar 12, 2026
e85e8b5
Merge branch 'develop' into users/adjordje-amd/pmc-collector
adjordje-amd Mar 12, 2026
6312678
fix(pmc): remove debug printf and fix clang-format issues
adjordje-amd Mar 12, 2026
73ed345
refactor(pmc): address review comments and modernize collectors
adjordje-amd Mar 12, 2026
6dff09c
refactor(pmc): address review comments and modernize collectors
adjordje-amd Mar 12, 2026
6055620
Fix formatting
adjordje-amd Mar 12, 2026
b815fa2
Fix unit tests, remove get_use_cache_output
adjordje-amd Mar 13, 2026
a6deb21
Cleanup
adjordje-amd Mar 13, 2026
8b2bc4e
refactor(pmc): unify NIC collector with base::collector pattern
adjordje-amd Mar 14, 2026
60f38cf
feat(pmc): add SDMA usage metric and minor collector improvements
adjordje-amd Mar 16, 2026
a2e14be
WIP: refactoring before type erasure implementation
adjordje-amd Mar 17, 2026
ff2044c
fix(pmc): address PR review issues - logs, dead code, and move semantics
adjordje-amd Mar 17, 2026
af8f1d0
Fix AINIC dependency
adjordje-amd Mar 19, 2026
d722a36
fix(pmc): guard NIC API calls with ROCPROFSYS_BUILD_AINIC preprocessor
adjordje-amd Mar 19, 2026
ae71e2b
Change function used to gather devices
adjordje-amd Mar 19, 2026
5879cac
Fix SDMA tests in non-supported env
adjordje-amd Mar 19, 2026
b7bf221
Cleanup
adjordje-amd Mar 20, 2026
bdd33e5
Add missing unit tests, bugfixes
adjordje-amd Mar 20, 2026
33c1217
Renam AINIC pmc metrics
adjordje-amd Mar 20, 2026
79d82b7
Code cleanup
adjordje-amd Mar 20, 2026
a06025c
Merge branch 'develop' into users/adjordje-amd/pmc-collector
adjordje-amd Mar 23, 2026
3a0eec9
Update copyright header
dgaliffiAMD Mar 26, 2026
77b71d0
Merge branch 'develop' into users/adjordje-amd/pmc-collector
adjordje-amd Mar 30, 2026
82f18d5
fix(pmc): initialize track metadata once before device loop
adjordje-amd Mar 25, 2026
206926d
Address comments
adjordje-amd Mar 30, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ target_sources(
${CMAKE_CURRENT_SOURCE_DIR}/invoke.hpp
${CMAKE_CURRENT_SOURCE_DIR}/join.hpp
${CMAKE_CURRENT_SOURCE_DIR}/setup.hpp
${CMAKE_CURRENT_SOURCE_DIR}/span.hpp
${CMAKE_CURRENT_SOURCE_DIR}/traits.hpp
${CMAKE_CURRENT_SOURCE_DIR}/md5sum.hpp
${CMAKE_CURRENT_SOURCE_DIR}/static_object.hpp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ agent_manager::insert_agent(agent& _agent)
_agent.device_type_index = _agent_counts[_agent.type]++;
_agents.emplace_back(std::make_shared<agent>(_agent));

LOG_TRACE("Inserting agent with device handle: {}, and agent id: {}, device type: {}",
_agent.device_id, _agent.device_type_index, to_string(_agent.type));
LOG_INFO("Inserting agent with device handle: {}, and agent id: {}, device type: {}",
_agent.device_id, _agent.device_type_index, to_string(_agent.type));
}

const agent&
Expand Down
6 changes: 6 additions & 0 deletions projects/rocprofiler-systems/source/lib/core/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2555,6 +2555,12 @@ get_caching_perfetto()
return _v;
}

bool
get_use_cache_output()
{
return get_use_rocpd() || get_caching_perfetto();
}

int
get_kill_delay()
{
Expand Down
3 changes: 3 additions & 0 deletions projects/rocprofiler-systems/source/lib/core/config.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,9 @@ get_use_rocpd() ROCPROFSYS_HOT;
bool&
get_caching_perfetto() ROCPROFSYS_HOT;

bool
get_use_cache_output() ROCPROFSYS_HOT;

bool
get_merge_perfetto_files();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@
#include "core/trace_cache/metadata_registry.hpp"
#include "core/trace_cache/sample_type.hpp"
#include "core/trace_cache/storage_parser.hpp"

#include "library/pmc/collectors/gpu/sample.hpp"
#include "library/pmc/collectors/nic/sample.hpp"
#include "library/runtime.hpp"

#include <memory>
#include <unistd.h>

Expand All @@ -40,8 +40,9 @@ namespace trace_cache
using storage_parser_t =
storage_parser<type_identifier_t, kernel_dispatch_sample, memory_copy_sample,
memory_allocate_sample, region_sample, in_time_sample,
pmc_event_with_sample, amd_smi_sample, cpu_freq_sample,
backtrace_region_sample, scratch_memory_sample, ainic_sample>;
pmc_event_with_sample, pmc::collectors::gpu::sample,
pmc::collectors::nic::sample, cpu_freq_sample, backtrace_region_sample,
scratch_memory_sample>;

using buffer_storage_t = buffer_storage<flush_worker_factory_t, type_identifier_t>;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

#pragma once
#include "common/span.hpp"
#include <array>
#include <cstdint>
#include <optional>
#include <string_view>
Expand Down Expand Up @@ -104,6 +105,17 @@ struct is_vector<std::vector<T>> : std::true_type
template <typename T>
inline constexpr bool is_vector_v = is_vector<T>::value;

template <typename T>
struct is_array : std::false_type
{};

template <typename T, size_t N>
struct is_array<std::array<T, N>> : std::true_type
{};

template <typename T>
inline constexpr bool is_array_v = is_array<T>::value;

template <typename T>
static constexpr bool is_string_view_v =
std::is_same_v<std::decay_t<T>, std::string_view>;
Expand All @@ -122,7 +134,7 @@ inline constexpr bool is_optional_v = is_optional<T>::value;
template <typename T>
inline constexpr bool is_supported_type_v =
is_span_v<T> || std::is_integral_v<T> || std::is_floating_point_v<T> ||
is_string_view_v<T> || is_vector_v<T> || is_optional_v<T>;
is_string_view_v<T> || is_vector_v<T> || is_optional_v<T> || is_array_v<T>;

template <typename T>
struct is_enum_class
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
#include <rocprofiler-sdk/callback_tracing.h>
#include <rocprofiler-sdk/cxx/name_info.hpp>
#include <set>
#include <sstream>
#include <spdlog/fmt/ranges.h>
#include <stdint.h>
#include <string.h>
#include <string>
Expand All @@ -62,18 +62,6 @@ struct process
uint32_t end;
};

template <typename Category>
inline std::string
annotate_category(std::optional<int> first_section = std::nullopt,
std::optional<int> second_section = std::nullopt)
{
std::stringstream ss;
ss << std::string(tim::trait::name<Category>::value);
if(first_section) ss << "_" << std::to_string(*first_section);
if(second_section) ss << "_" << std::to_string(*second_section);
return ss.str();
}

struct pmc
{
agent_type type;
Expand Down Expand Up @@ -131,16 +119,12 @@ struct thread

template <typename Category>
inline std::string
annotate_with_device_id(uint32_t device_id,
std::optional<int> first_section = std::nullopt,
std::optional<int> second_section = std::nullopt)
format_track_name(std::optional<int> first_section = std::nullopt,
std::optional<int> second_section = std::nullopt)
{
std::stringstream ss;
ss << std::string(tim::trait::name<Category>::value) + " [" +
std::to_string(device_id) + "]";
if(first_section) ss << "_" << std::to_string(*first_section);
if(second_section) ss << "_" << std::to_string(*second_section);
return ss.str();
return fmt::format("{}{}{}", tim::trait::name<Category>::value,
first_section ? fmt::format("_{}", *first_section) : "",
second_section ? fmt::format("_{}", *second_section) : "");
}

template <typename Category>
Expand Down
Loading
Loading