From 4fc6ebe134feeaf65716b846e72ec6f1308cbdea Mon Sep 17 00:00:00 2001 From: Thomas Applencourt Date: Wed, 4 Sep 2024 12:07:23 -0500 Subject: [PATCH] Update tracer_ze_helpers.include.c Fix uninitialized variables --- ze/tracer_ze_helpers.include.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ze/tracer_ze_helpers.include.c b/ze/tracer_ze_helpers.include.c index 9b1e5dea..292e993f 100644 --- a/ze/tracer_ze_helpers.include.c +++ b/ze/tracer_ze_helpers.include.c @@ -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)){