[llvm-commits] Review Request: llvm-test-suite disabling unix-smail's call to getpwent()
Joel Jones
joel_k_jones at apple.com
Fri Apr 6 14:35:32 PDT 2012
After reviewing the performance characteristics over time of the unix-smail benchmark with
Daniel Dunbar, we determined that the majority of the run-time was spent inside of getpwent(),
which is a library routine which gets information about users authorized to access the system
the test runs on. This is not suitable for a performance benchmark, as the input may not be
stable from one run to another. The number of users may in /etc/passwd may change and/or
the number of users authorized using some kind of network authorization mechanism may change
as well.
Joel
Index: MultiSource/Benchmarks/Prolangs-C/unix-smail/pw.c
===================================================================
--- MultiSource/Benchmarks/Prolangs-C/unix-smail/pw.c (revision 153796)
+++ MultiSource/Benchmarks/Prolangs-C/unix-smail/pw.c (working copy)
@@ -135,11 +135,20 @@
unsigned int i;
static int pw_eof = 0;
- if((pw_eof == 1)
- || ((pwent = getpwent()) == (struct passwd *) NULL)) {
+/*
+** Performance measurements indicate that the majority of time this
+** application spends is in getpwent(). As getpwent just tests how
+** many authorized users there are, don't do the call.
+*/
+
+/* if((pw_eof == 1)
+** || ((pwent = getpwent()) == (struct passwd *) NULL)) {
+*/
pw_eof = 1;
return(PNULL);
- }
+/*
+** }
+*/
/*
** Get an entry from the password file.
** Parse relevant strings.
More information about the llvm-commits
mailing list