[llvm-commits] [PATCH] Test-suite: Link 7zip against pthread

Alastair Murray alastairmurray42 at gmail.com
Fri Dec 28 16:12:16 PST 2012


Hi Michael,

On 28/12/12 04:29, Michael Gottesman wrote:
> So it looks like I did jerry rig it correctly. If you run the utility on OS X (can you confirm this on linux for me?), the first thing you see is:

I can confirm that the program only uses 1 thread on Linux.

> There are two differences in opinion with regards to whether to leave the actual pthreads call in the benchmark (attempting to remember the internal debate in my head). On the one hand one could say one is measuring something extraneous to the actual program computation (i.e. kicking off a thread/etc) which could introduce noise into the measurement. But on the other hand one could argue that the test runs long enough (~9 seconds on my core i7) that such overhead should be small enough to be factored in as generic noise relative to the size of variations which we may be interested in. Additionally one could argue that changing any benchmark to be bad form.

I ran the benchmark using 'ltrace' and pthread_create is actually never 
called (it was still required for linking, presumably on a never 
executed path).

pthread_mutex_[init,destroy,lock,unlock] are called though ('lock' and 
'unlock' quite a lot).  Technically I suppose that is wasted work, but 
in a single-threaded context it is probably a fairly stable amount of 
wasted work.

Regards,
Alastair.




More information about the llvm-commits mailing list