Skip to content

Commit

Permalink
fixing error which caused less than 1 rel_cpu_speed to be interpreted…
Browse files Browse the repository at this point in the history
… as 0
  • Loading branch information
Vignesh2208 committed Oct 23, 2019
1 parent 8d133e8 commit df666ec
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/tracer/tracer.c
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ int run_commanded_process(hashmap * tracees, llist * tracee_list,

LOG("Running Child: %d Quanta: %d instructions\n", pid, n_insns);

n_insns = n_insns_orig * (int) rel_cpu_speed;
n_insns = (int)(n_insns_orig * rel_cpu_speed);

if (n_insns <= buffer_window_size)
singlestepmode = 1;
Expand Down Expand Up @@ -533,7 +533,7 @@ int run_commanded_process(hashmap * tracees, llist * tracee_list,
}
LOG("PTRACE CONT Error: %d\n", errno);
errno = 0;
n_insns = n_insns_orig * (int) rel_cpu_speed;
n_insns = (int)(n_insns_orig * rel_cpu_speed);
//assert(0);
continue;
}
Expand Down

0 comments on commit df666ec

Please sign in to comment.