SWDEV-489158: Adding consumer+producer model to AST evaluation (#13)

* Rebased optizations for rocprofv3 tool

* Fixing merge conflicts

* Formatting

* Open from within mutex

* Small name changes

* Added operator

* removed some parameters

* Optimizing counter collection

* Re-arrange code

* Adding back dimension query

* Formatting

* Update source/lib/rocprofiler-sdk/thread_trace/att_core.cpp

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Formatting 2

* Fix for test compilation

* Fix for yield

* Adding back check for zero

* Improved thread handling

* Formatting

* Remove automatic start

* Adding test

* Small fixes

* Adding lock for buffer callbacks

* Fix for race condition in AST

* Adding check for ptr

---------

Co-authored-by: Giovanni Baraldi <gbaraldi@amd.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Esse commit está contido em:
Baraldi, Giovanni
2024-12-05 05:33:53 +01:00
commit de GitHub
commit b7661bccfd
15 arquivos alterados com 577 adições e 153 exclusões
+11 -6
Ver Arquivo
@@ -28,6 +28,7 @@
#include "lib/rocprofiler-sdk/aql/packet_construct.hpp"
#include "lib/rocprofiler-sdk/context/context.hpp"
#include "lib/rocprofiler-sdk/counters/dispatch_handlers.hpp"
#include "lib/rocprofiler-sdk/counters/sample_processing.hpp"
#include "lib/rocprofiler-sdk/hsa/queue_controller.hpp"
#include "lib/rocprofiler-sdk/kernel_dispatch/profiling_time.hpp"
@@ -157,6 +158,8 @@ start_context(const context::context* ctx)
if(!already_enabled)
{
callback_thread_start();
for(auto& cb : ctx->counter_collection->callbacks)
{
// Insert our callbacks into HSA Interceptor. This
@@ -182,12 +185,12 @@ start_context(const context::context* ctx)
correlation_id);
},
// Completion CB
[=](const hsa::Queue& q,
hsa::rocprofiler_packet kern_pkt,
const hsa::Queue::queue_info_session_t& session,
inst_pkt_t& aql,
kernel_dispatch::profiling_time dispatch_time) {
completed_cb(ctx, cb, q, kern_pkt, session, aql, dispatch_time);
[=](const hsa::Queue& /* q */,
hsa::rocprofiler_packet /* kern_pkt */,
std::shared_ptr<hsa::Queue::queue_info_session_t>& session,
inst_pkt_t& aql,
kernel_dispatch::profiling_time dispatch_time) {
completed_cb(ctx, cb, session, aql, dispatch_time);
});
}
}
@@ -206,6 +209,8 @@ stop_context(const context::context* ctx)
});
if(controller) controller->disable_serialization();
callback_thread_stop();
}
rocprofiler_status_t