Ghetto benchmark test
authorBarret Rhoden <brho@cs.berkeley.edu>
Wed, 21 Nov 2012 02:50:02 +0000 (18:50 -0800)
committerBarret Rhoden <brho@cs.berkeley.edu>
Wed, 21 Nov 2012 02:50:02 +0000 (18:50 -0800)
commitbec385c8aa016290ab61be755f126cf03fe795a0
tree71addccb658fcc1dd9c8e83112a7c1a494e550bb
parent1673a51391d6849369880330778a930856a87954
Ghetto benchmark test

Juan had a problem with code similar to this.  If you don't do
res += whatever
and juse do
res = whatever
(his example code), then you could get varying results based on what
else you put in the loop.  Specifically, if you do some extra stuff like
a read_tsc() and track the number of loop iterations, then the critical
path of the inner loop is actually shorter than without, leading to a
10-20% performance difference.
kern/src/schedule.c
tests/juan_test.c [new file with mode: 0644]
user/parlib/include/i686/arch.h
user/parlib/include/riscv/arch.h
user/parlib/include/sparc/arch.h