[netperf-dev] netperf2 commit notice r47 - trunk/src

raj at netperf.org raj at netperf.org
Mon Dec 12 15:50:10 PST 2005


Author: raj
Date: 2005-12-12 15:50:08 -0800 (Mon, 12 Dec 2005)
New Revision: 47

Modified:
   trunk/src/hist.h
   trunk/src/netlib.c
   trunk/src/nettest_bsd.c
Log:
Some initial stuff for perhaps a lighter-weight timstamp for histogram
on ia64 linux


Modified: trunk/src/hist.h
===================================================================
--- trunk/src/hist.h	2005-12-12 22:16:46 UTC (rev 46)
+++ trunk/src/hist.h	2005-12-12 23:50:08 UTC (rev 47)
@@ -38,6 +38,10 @@
 #ifdef IRIX
 #include <sys/time.h>
 #endif /* IRIX */
+
+#if defined(HAVE_GET_HRT)
+#include "hrt.h"
+#endif
    
 struct histogram_struct {
   int unit_usec[10];
@@ -86,6 +90,8 @@
 
 #ifdef HAVE_GETHRTIME
 void HIST_timestamp(hrtime_t *timestamp);
+#elif defined(HAVE_GET_HRT)
+void HIST_timestamp(hrt_t *timestamp);
 #else
 void HIST_timestamp(struct timeval *timestamp);
 #endif
@@ -96,6 +102,8 @@
 */
 #ifdef HAVE_GETHRTIME
 int delta_micro(hrtime_t *begin, hrtime_t *end);
+#elif defined(HAVE_GET_HRT)
+int delta_micro(hrt_t *begin, hrt_t *end);
 #else
 int delta_micro(struct timeval *begin, struct timeval *end);
 #endif

Modified: trunk/src/netlib.c
===================================================================
--- trunk/src/netlib.c	2005-12-12 22:16:46 UTC (rev 46)
+++ trunk/src/netlib.c	2005-12-12 23:50:08 UTC (rev 47)
@@ -3084,6 +3084,22 @@
   return(nsecs/1000);
 }
 
+#elif defined(HAVE_GET_HRT)
+#include "hrt.h"
+
+void
+HIST_timestamp(hrt_t *timestamp)
+{
+  *timestamp = get_hrt();
+}
+
+int
+delta_micro(hrt_t *begin, hrt_t *end)
+{
+
+  return((int)get_hrt_delta(*end,*begin));
+
+}
 #else
 
 void

Modified: trunk/src/nettest_bsd.c
===================================================================
--- trunk/src/nettest_bsd.c	2005-12-12 22:16:46 UTC (rev 46)
+++ trunk/src/nettest_bsd.c	2005-12-12 23:50:08 UTC (rev 47)
@@ -189,6 +189,10 @@
 #ifdef HAVE_GETHRTIME
 static hrtime_t time_one;
 static hrtime_t time_two;
+#elif HAVE_GET_HRT
+#include "hrt.h"
+static hrt_t time_one;
+static hrt_t time_two;
 #else
 static struct timeval time_one;
 static struct timeval time_two;



More information about the netperf-dev mailing list