Skip to content

Commit

Permalink
Update tracer_ze_helpers.include.c (#285)
Browse files Browse the repository at this point in the history
Fix uninitialized variables
  • Loading branch information
TApplencourt authored Sep 4, 2024
1 parent 1f37897 commit d3a370c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ze/tracer_ze_helpers.include.c
Original file line number Diff line number Diff line change
Expand Up @@ -1053,9 +1053,9 @@ static void readCopyE(uint32_t driverIdx, uint32_t deviceIdx, copyEngineData *co
}

static void thapi_sampling_energy() {
uint64_t ts_us;
uint64_t energy_uj;
uint32_t frequency;
uint64_t ts_us = 0;
uint64_t energy_uj = 0;
uint32_t frequency = 0;
for (uint32_t driverIdx = 0; driverIdx < _sampling_driverCount; driverIdx++) {
for (uint32_t deviceIdx = 0; deviceIdx < _sampling_deviceCount[driverIdx]; deviceIdx++) {
if (tracepoint_enabled(lttng_ust_ze_sampling, gpu_frequency)){
Expand Down

0 comments on commit d3a370c

Please sign in to comment.