diff options
author | Birte Kristina Friesel <derf@finalrewind.org> | 2025-05-13 16:00:22 +0200 |
---|---|---|
committer | Birte Kristina Friesel <derf@finalrewind.org> | 2025-05-13 16:00:49 +0200 |
commit | d666b713716af62708cc9fefe3ab136e7f18b5ae (patch) | |
tree | df6f2a8a0600512da758864da343ca2b74b72dc8 /include | |
parent | 5f8f20540a69713921b0f49ae9d28b5f56943b34 (diff) |
TS: Add AspectC++ support
Diffstat (limited to 'include')
-rw-r--r-- | include/dfatool_host_dpu.ah | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/include/dfatool_host_dpu.ah b/include/dfatool_host_dpu.ah index 560e410..0e03d31 100644 --- a/include/dfatool_host_dpu.ah +++ b/include/dfatool_host_dpu.ah @@ -88,6 +88,22 @@ aspect DfatoolHostDPUTiming { ); } + advice call("% dpu_copy_to(...)") : around() { + size_t payload_size = *(tjp->arg<4>()); + gettimeofday(&starttime, NULL); + tjp->proceed(); + gettimeofday(&stoptime, NULL); + double time_us = (stoptime.tv_sec - starttime.tv_sec) * 1000000.0 + (stoptime.tv_usec - starttime.tv_usec); + printf("[::] dpu_copy_to @ %s:%d | n_dpus=%u n_ranks=%u payload_B=%lu | latency_us=%f throughput_MiBps=%f\n", + tjp->filename(), + tjp->line(), + n_dpus, n_ranks, + payload_size, + time_us, + payload_size / (time_us * M_to_Mi) + ); + } + advice call("% dpu_push_xfer(...)") : around() { size_t payload_size = *(tjp->arg<4>()); gettimeofday(&starttime, NULL); |