Add debug printing for write interceptor injected packets (#674)
* Add debug printing for write interceptor injected packets Adds debug printing for write interceptor injected packets. All packets that pass through the write intercepter while enabled will be printed. Only executes/prints when the environment variable GLOG_v is set to 2 or higher (otherwise it is a no-op and the expression is not evaluated). * source formatting (clang-format v11) (#675) Co-authored-by: bwelton <1683479+bwelton@users.noreply.github.com> * Changes on fmt location --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: bwelton <1683479+bwelton@users.noreply.github.com>
Tá an tiomantas seo le fáil i:
1 tuismitheoir
41c0ddd72d
tiomantas
e0caae9ebc
4 comhad athraithe
+179
-4
Níor tháinig aon chomhaid le do chuardach
@@ -25,6 +25,7 @@
|
||||
#include "lib/rocprofiler-sdk/buffer.hpp"
|
||||
#include "lib/rocprofiler-sdk/context/context.hpp"
|
||||
#include "lib/rocprofiler-sdk/hsa/code_object.hpp"
|
||||
#include "lib/rocprofiler-sdk/hsa/details/fmt.hpp"
|
||||
#include "lib/rocprofiler-sdk/hsa/hsa.hpp"
|
||||
#include "lib/rocprofiler-sdk/hsa/queue_controller.hpp"
|
||||
|
||||
@@ -404,6 +405,10 @@ WriteInterceptor(const void* packets,
|
||||
.extern_corr_ids = extern_corr_ids});
|
||||
}
|
||||
|
||||
// Command is only executed if GLOG_v=2 or higher, otherwise it is a no-op
|
||||
ROCP_TRACE << fmt::format(
|
||||
"QueueID {}: {}", queue.get_id().handle, fmt::join(transformed_packets, fmt::format(" ")));
|
||||
|
||||
writer(transformed_packets.data(), transformed_packets.size());
|
||||
}
|
||||
} // namespace
|
||||
@@ -428,7 +433,6 @@ Queue::Queue(const AgentCache& agent,
|
||||
: _core_api(core_api)
|
||||
, _ext_api(ext_api)
|
||||
, _agent(agent)
|
||||
|
||||
{
|
||||
LOG_IF(FATAL,
|
||||
_ext_api.hsa_amd_queue_intercept_create_fn(_agent.get_hsa_agent(),
|
||||
|
||||
Tagairt in Eagrán Nua
Cuir bac ar úsáideoir