[llvm-commits] [test-suite] r154271 - /test-suite/trunk/MultiSource/Benchmarks/Prolangs-C/unix-smail/pw.c
Joel Jones
joel_k_jones at apple.com
Sat Apr 7 15:32:20 PDT 2012
Author: joel_k_jones
Date: Sat Apr 7 17:32:20 2012
New Revision: 154271
URL: http://llvm.org/viewvc/llvm-project?rev=154271&view=rev
Log:
Modify unix-small to be more appropriate as a performance test.
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.
The test is left in place as a correctness test.
Modified:
test-suite/trunk/MultiSource/Benchmarks/Prolangs-C/unix-smail/pw.c
Modified: test-suite/trunk/MultiSource/Benchmarks/Prolangs-C/unix-smail/pw.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/MultiSource/Benchmarks/Prolangs-C/unix-smail/pw.c?rev=154271&r1=154270&r2=154271&view=diff
==============================================================================
--- test-suite/trunk/MultiSource/Benchmarks/Prolangs-C/unix-smail/pw.c (original)
+++ test-suite/trunk/MultiSource/Benchmarks/Prolangs-C/unix-smail/pw.c Sat Apr 7 17:32:20 2012
@@ -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