[netperf-dev] netperf4 commit notice r182 - in trunk: . src
burger at netperf.org
burger at netperf.org
Thu Jun 15 23:09:05 PDT 2006
Author: burger
Date: 2006-06-15 23:09:04 -0700 (Thu, 15 Jun 2006)
New Revision: 182
Modified:
trunk/configure.ac
trunk/src/Makefile.am
trunk/src/netsysstats_common.c
trunk/src/netsysstats_hpux.c
Log:
Made modifications to allow netperf4 to build and execute on HPUX 11.11
Modification remove compile errors and a library loading error which occured
during test initialization on the netserver.
Stephen Burger
Modified: trunk/configure.ac
===================================================================
--- trunk/configure.ac 2006-05-31 17:22:15 UTC (rev 181)
+++ trunk/configure.ac 2006-06-16 06:09:04 UTC (rev 182)
@@ -646,6 +646,13 @@
enable_cpuutil="pstatnew - auto"
NETSYS_SOURCE="hpux"
;;
+ *-*-hpux11.11)
+ use_cpuutil=true
+ AC_DEFINE([USE_PSTAT],,
+ [Use HP-UX's pstat interface to measure CPU util.])
+ enable_cpuutil="pstat - auto"
+ NETSYS_SOURCE="hpux"
+ ;;
*-*-hpux11* | *-*-hpux10*)
use_cpuutil=true
AC_DEFINE([USE_PSTAT],,
Modified: trunk/src/Makefile.am
===================================================================
--- trunk/src/Makefile.am 2006-05-31 17:22:15 UTC (rev 181)
+++ trunk/src/Makefile.am 2006-06-16 06:09:04 UTC (rev 182)
@@ -41,7 +41,7 @@
# so far, it does not appear we need this in netserver
netperf_LDFLAGS = -rpath $(libdir) -export-dynamic
-netserver_LDFLAGS = -rpath $(libdir)
+netserver_LDFLAGS = -rpath $(libdir) -export-dynamic
missing/getaddrinfo.o: $(srcdir)/missing/getaddrinfo.c
$(COMPILE) -o $@ -c $(srcdir)/missing/getaddrinfo.c
Modified: trunk/src/netsysstats_common.c
===================================================================
--- trunk/src/netsysstats_common.c 2006-05-31 17:22:15 UTC (rev 181)
+++ trunk/src/netsysstats_common.c 2006-06-16 06:09:04 UTC (rev 182)
@@ -348,7 +348,6 @@
if (ap != NULL) {
ap = set_counter_attribute(test, cpu_stats, "idle_count", cpu[i].idle);
}
-#ifndef EXTRA_COUNTERS_MISSING
if (ap != NULL) {
ap = set_counter_attribute(test, cpu_stats, "user_count", cpu[i].user);
}
@@ -361,7 +360,6 @@
if (ap != NULL) {
ap = set_counter_attribute(test, cpu_stats, "other_count", cpu[i].other);
}
-#endif
xmlAddChild(stats,cpu_stats);
} else {
/* error xmlNewNode failed to allocate a new node for the next cpu */
@@ -431,7 +429,6 @@
if (ap != NULL) {
ap = set_counter_attribute(test, stats, "idle_count", total_sys->idle);
}
-#ifndef EXTRA_COUNTERS_MISSING
if (ap != NULL) {
ap = set_counter_attribute(test, stats, "user_count", total_sys->user);
}
@@ -444,7 +441,6 @@
if (ap != NULL) {
ap = set_counter_attribute(test, stats, "other_count", total_sys->other);
}
-#endif
ap = add_per_cpu_attributes(test,stats,total_cpu, tsd->num_cpus);
}
if (ap == NULL) {
Modified: trunk/src/netsysstats_hpux.c
===================================================================
--- trunk/src/netsysstats_hpux.c 2006-05-31 17:22:15 UTC (rev 181)
+++ trunk/src/netsysstats_hpux.c 2006-06-16 06:09:04 UTC (rev 182)
@@ -120,28 +120,29 @@
res[i].calibrate = (uint64_t)(elapsed * ticks * iticksperclktick);
res[i].idle = (((uint64_t)psp[i].psp_idlecycles.psc_hi << 32) +
psp[i].psp_idlecycles.psc_lo);
-#ifndef EXTRA_COUNTERS_MISSING
+ res[i].user = 0;
+ res[i].kernel = 0;
+ res[i].interrupt = 0;
+#ifndef _PST_STATIC_CONSTANTS_DEFINED
res[i].user = (((uint64_t)psp[i].psp_usercycles.psc_hi << 32) +
psp[i].psp_usercycles.psc_lo);
res[i].kernel = (((uint64_t)psp[i].psp_systemcycles.psc_hi << 32) +
psp[i].psp_systemcycles.psc_lo);
res[i].interrupt = (((uint64_t)psp[i].psp_interruptcycles.psc_hi << 32) +
psp[i].psp_interruptcycles.psc_lo);
+#endif
res[i].other = res[i].calibrate;
res[i].other -= res[i].idle;
res[i].other -= res[i].user;
res[i].other -= res[i].kernel;
res[i].other -= res[i].interrupt;
-#endif
if(test->debug) {
fprintf(test->where, "\tidle[%d] = %#llx", i, res[i].idle);
-#ifndef EXTRA_COUNTERS_MISSING
fprintf(test->where, "\tuser[%d] = %#llx", i, res[i].user);
fprintf(test->where, "\tkern[%d] = %#llx", i, res[i].kernel);
fprintf(test->where, "\tintr[%d] = %#llx", i, res[i].interrupt);
fprintf(test->where, "\tothr[%d] = %#llx", i, res[i].other);
-#endif
fprintf(test->where, "\n");
fflush(test->where);
}
More information about the netperf-dev
mailing list