diff options
author | Marcin Bernatowicz <marcin.bernatowicz@linux.intel.com> | 2023-10-06 16:06:41 +0000 |
---|---|---|
committer | Kamil Konieczny <kamil.konieczny@linux.intel.com> | 2023-10-10 14:17:41 +0200 |
commit | 4a5c8c7cc7dd178e483bdca4d8f052e759d9ce62 (patch) | |
tree | 67486519b6761b5e0db1c1f0cd95e49f02a3a621 /benchmarks | |
parent | 3c74473acd7c82668ce27466975397a3f4d5828d (diff) |
benchmarks/gem_wsim: reposition repeat_start variable
No need for repeat_start in struct workload.
It's now a variable in run_workload function scope.
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Signed-off-by: Marcin Bernatowicz <marcin.bernatowicz@linux.intel.com>
Diffstat (limited to 'benchmarks')
-rw-r--r-- | benchmarks/gem_wsim.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/benchmarks/gem_wsim.c b/benchmarks/gem_wsim.c index c64397eae..24b51ec8a 100644 --- a/benchmarks/gem_wsim.c +++ b/benchmarks/gem_wsim.c @@ -209,8 +209,6 @@ struct workload { uint32_t bb_prng; uint32_t bo_prng; - struct timespec repeat_start; - unsigned int nr_ctxs; struct ctx *ctx_list; @@ -2280,7 +2278,7 @@ static void sync_deps(struct workload *wrk, struct w_step *w) static void *run_workload(void *data) { struct workload *wrk = (struct workload *)data; - struct timespec t_start, t_end; + struct timespec t_start, t_end, repeat_start; struct w_step *w; int throttle = -1; int qd_throttle = -1; @@ -2294,7 +2292,7 @@ static void *run_workload(void *data) count++) { unsigned int cur_seqno = wrk->sync_seqno; - clock_gettime(CLOCK_MONOTONIC, &wrk->repeat_start); + clock_gettime(CLOCK_MONOTONIC, &repeat_start); for (i = 0, w = wrk->steps; wrk->run && (i < wrk->nr_steps); i++, w++) { @@ -2308,7 +2306,7 @@ static void *run_workload(void *data) int elapsed; clock_gettime(CLOCK_MONOTONIC, &now); - elapsed = elapsed_us(&wrk->repeat_start, &now); + elapsed = elapsed_us(&repeat_start, &now); do_sleep = w->period - elapsed; time_tot += elapsed; if (elapsed < time_min) |