[igt-dev] [PATCH i-g-t 08/17] benchmarks/gem_wsim: reposition repeat_start variable
Marcin Bernatowicz
marcin.bernatowicz at linux.intel.com
Thu Sep 28 17:45:23 UTC 2023
No need for repeat_start in struct workload.
It's now a variable in run_workload function scope.
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
Signed-off-by: Marcin Bernatowicz <marcin.bernatowicz at linux.intel.com>
---
benchmarks/gem_wsim.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/benchmarks/gem_wsim.c b/benchmarks/gem_wsim.c
index f91e126f1..10ad6cf75 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;
@@ -2282,7 +2280,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;
@@ -2296,7 +2294,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++) {
@@ -2310,7 +2308,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)
--
2.42.0
More information about the igt-dev
mailing list