Incremental Counter Profile Creation (#933)

* Incremental Counter Profile Creation

Adds support for incremental counter creation. How this functions is the
behavior of rocprofiler_create_profile_config has been changed.

rocprofiler_create_profile_config(rocprofiler_agent_id_t           agent_id,
                                  rocprofiler_counter_id_t*        counters_list,
                                  size_t                           counters_count,
                                  rocprofiler_profile_config_id_t* config_id)

The behavior of this function now allows an existing config_id to be
supplied via config_id. The counters contained in this config will be
copied over and used as a base for a new config along with any counters
supplied in counters_list. The new config id is returned via config_id
and can be used in future dispatch/agent counting sessions.

A new config is created over modifying an existing config since there
is no gaurentee that the existing config isn't already in use. While we
could add locks (or other mutual exclusion properties) to check if its
in use and reject an update, the benefit from doing so is minor in
comparison to just creating a new config. This also side steps a common
pattern a tool may use to add additional counters at some point later on
during execution. Now they can do that without destroying the existing
config.

---------

Co-authored-by: Benjamin Welton <ben@amd.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Bu işleme şunda yer alıyor:
Benjamin Welton
2024-06-19 00:11:03 -07:00
işlemeyi yapan: GitHub
ebeveyn ab92bef1a4
işleme 81d1407565
12 değiştirilmiş dosya ile 140 ekleme ve 46 silme
-1
Dosyayı Görüntüle
@@ -65,7 +65,6 @@ dispatch_callback(rocprofiler_queue_id_t /* queue_id */,
ToolData& tool = *reinterpret_cast<ToolData*>(userdata);
dispatch_userdata->ptr = userdata;
static std::atomic<int> call_id{0};
static std::string_view desired_func_name = "branching_kernel";
try