rocprofv3 kernel renaming support + misc rocprofv3 updates (#992)

* Increase rocprofv3 tool buffer size

- 32 pages instead of 1 page

* Improve rocprofv3 perfetto track labels

* Preliminary kernel renaming support + misc rocprofv3 updates

- add rocprofv3 option --kernel-rename
- add rocprofv3 options for perfetto settings (buffer size, etc.)
- add CSV columns for kernel trace
  - Thread_Id
  - Dispatch_Id
- add CSV column for counter_collection
 - Kernel_Id
This commit is contained in:
Jonathan R. Madsen
2024-07-29 14:33:50 -05:00
committed by GitHub
parent 41f024475a
commit ebb021c59f
18 changed files with 641 additions and 60 deletions
@@ -25,6 +25,8 @@
#include "helper.hpp"
#include "output_file.hpp"
#include "lib/common/string_entry.hpp"
#include <rocprofiler-sdk/fwd.h>
#include <rocprofiler-sdk/marker/api_id.h>
@@ -90,6 +92,27 @@ write_json(tool_table* tool
json_ar(cereal::make_nvp("buffer_records", buffer_name_info));
json_ar(cereal::make_nvp("marker_api", marker_msg_data));
{
auto _extern_corr_id_strings = std::map<size_t, std::string>{};
if(tool::get_config().kernel_rename)
{
for(auto itr : *kernel_dispatch_deque)
{
auto _value = itr.correlation_id.external.value;
if(_value > 0)
{
const auto* _str = common::get_string_entry(_value);
if(_str) _extern_corr_id_strings.emplace(_value, *_str);
}
}
}
json_ar.setNextName("correlation_id");
json_ar.startNode();
json_ar(cereal::make_nvp("external", _extern_corr_id_strings));
json_ar.finishNode();
}
{
json_ar.setNextName("counters");
json_ar.startNode();