FWIW, I would love to see this, and any other things that can possibly touch pwent stuff disabled in the test suite.<div><br></div><div>Consider a system which is connected to a massive LDAP NSS, causing these function calls to actually be network operations. ;] It's terrible.<br>
<br><div class="gmail_quote">On Fri, Apr 6, 2012 at 11:35 PM, Joel Jones <span dir="ltr"><<a href="mailto:joel_k_jones@apple.com">joel_k_jones@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
After reviewing the performance characteristics over time of the unix-smail benchmark with<br>
Daniel Dunbar, we determined that the majority of the run-time was spent inside of getpwent(),<br>
which is a library routine which gets information about users authorized to access the system<br>
the test runs on. This is not suitable for a performance benchmark, as the input may not be<br>
stable from one run to another. The number of users may in /etc/passwd may change and/or<br>
the number of users authorized using some kind of network authorization mechanism may change<br>
as well.<br>
<br>
Joel<br>
<br>
Index: MultiSource/Benchmarks/Prolangs-C/unix-smail/pw.c<br>
===================================================================<br>
--- MultiSource/Benchmarks/Prolangs-C/unix-smail/pw.c (revision 153796)<br>
+++ MultiSource/Benchmarks/Prolangs-C/unix-smail/pw.c (working copy)<br>
@@ -135,11 +135,20 @@<br>
unsigned int i;<br>
static int pw_eof = 0;<br>
<br>
- if((pw_eof == 1)<br>
- || ((pwent = getpwent()) == (struct passwd *) NULL)) {<br>
+/*<br>
+** Performance measurements indicate that the majority of time this<br>
+** application spends is in getpwent(). As getpwent just tests how<br>
+** many authorized users there are, don't do the call.<br>
+*/<br>
+<br>
+/* if((pw_eof == 1)<br>
+** || ((pwent = getpwent()) == (struct passwd *) NULL)) {<br>
+*/<br>
pw_eof = 1;<br>
return(PNULL);<br>
- }<br>
+/*<br>
+** }<br>
+*/<br>
/*<br>
** Get an entry from the password file.<br>
** Parse relevant strings.<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
</blockquote></div><br></div>