From e9285d0cdea756a2830f0ace378e4197b36869aa Mon Sep 17 00:00:00 2001 From: Joshua Bakita Date: Fri, 12 Jun 2020 01:44:56 +0000 Subject: Add initial instrumentation to and fix warnings in DIS stressmarks Changes: - Backpoint fix to randInt range - Instrument benchmarks with time tracking - assert inputs are correct length to fix compiler warnings Problems: - Timing on a per-loop basis is non representative of real-world workloads, as we clear the cache after every loop. These all need to be re-instrumented to record times for the whole benchmark, rather than per-loop. --- dis/original/Pointer/pointer.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'dis/original/Pointer/pointer.c') diff --git a/dis/original/Pointer/pointer.c b/dis/original/Pointer/pointer.c index a0aa62e..5671697 100644 --- a/dis/original/Pointer/pointer.c +++ b/dis/original/Pointer/pointer.c @@ -20,7 +20,7 @@ #include "extra.h" #define MIN_FIELD_SIZE 16 -#define MAX_FIELD_SIZE 16777216 +#define MAX_FIELD_SIZE (16777216*4) // Modifed from original #define MIN_WINDOW_SIZE 1 #define MAX_WINDOW_SIZE 15 #define MIN_HOP_LIMIT 1 @@ -56,8 +56,8 @@ int main(int argc, char** argv){ unsigned int l; SET_UP - fscanf(stdin, "%lu %u %lu %ld %u", - &f, &l, &maxhops, &seed, &n); + assert(fscanf(stdin, "%lu %u %lu %ld %u", + &f, &l, &maxhops, &seed, &n) == 5); assert ((f >= MIN_FIELD_SIZE) && (f <= MAX_FIELD_SIZE)); w = (unsigned int) l; @@ -72,8 +72,8 @@ int main(int argc, char** argv){ return (-1); for (l=0; l= 0) && (thread[l].initial < f)); assert ((thread[l].minStop >= 0) && (thread[l].minStop < f)); assert ((thread[l].maxStop >= 0) && (thread[l].maxStop < f)); -- cgit v1.2.2