For OSDI, gettimeofday should be processed locally.
authorDavid Zhu <yuzhu@cs.berkeley.edu>
Mon, 26 Apr 2010 19:21:02 +0000 (12:21 -0700)
committerKevin Klues <klueska@cs.berkeley.edu>
Thu, 3 Nov 2011 00:35:45 +0000 (17:35 -0700)
Going to app server would lead to inaccurate measurement.

kern/src/syscall.c

index 36a47cf..ead2509 100644 (file)
@@ -997,11 +997,13 @@ intreg_t sys_gettimeofday(struct proc* p, int* buf)
 
        spin_lock(&gtod_lock);
        if(t0 == 0)
-#ifdef __CONFIG_APPSERVER__
-               t0 = ufe(time,0,0,0,0);
+
+#if (defined __CONFIG_APPSERVER__) && (!defined __CONFIG_OSDI__)
+       // For OSDI, do not get time from appserver because it would lead to inaccurate measurements.
+       t0 = ufe(time,0,0,0,0);
 #else
-               // Nanwan's birthday, bitches!!
-               t0 = 1242129600;
+       // Nanwan's birthday, bitches!!
+       t0 = 1242129600;
 #endif 
        spin_unlock(&gtod_lock);