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

David Blaikie dblaikie at gmail.com
Fri Dec 28 08:54:40 PST 2012


On Fri, Dec 28, 2012 at 1:29 AM, Michael Gottesman <mgottesman at apple.com> 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:
>
> -----
> 7-Zip (A) [64] 9.20  Copyright (c) 1999-2010 Igor Pavlov  2010-11-18
> p7zip Version 9.20 (locale=en_US.UTF-8,Utf16=on,HugeFiles=on,1 CPU)
>
> RAM size:     128 MB,  # CPU hardware threads:   1
> RAM usage:    107 MB,  # Benchmark threads:      1
> -----
>
> 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.
>
> *BUT* IIRC, the real reason behind my choosing to not remove it was time and also that the more important benchmarks for 7zip are not complete (i.e. I am working on a new type of test for the MultiSource section test suite which would have 1 compilation phase + multiple tests since that will give us more flexibility).
>
> Time IMHO is a horrible excuse not to do something right so let me look into this.
>
> Also the compilation issue here + the recent issues I have had with ALAC on linux says that we need LNT tests on linux cpus since then this would just have come up immediately and I could have fixed it. (Volunteers?)

I'd love to have them & have spent some time earlier this year trying
to set them up but had no end of trouble with machine noise (taking a
reasonably modern Ubuntu distribution & stripping out a bunch of
services, ASR, CPU frequency scaling, etc). If I were to spend more
time on this the next step would probably be to try building up a
bare-bones Linux box in the hopes that I could get something that
produced more stable numbers.

>
> Michael
>
> On Dec 28, 2012, at 2:15 AM, Michael Gottesman <mgottesman at apple.com> wrote:
>
>> I jerry rigged it so that it uses only 1 thread. It might still use pthreads as you said.
>>
>> I had several versions of it so perhaps the hack got lost in the muddle.
>>
>> [in which case thanks = )]
>>
>> Ill look at this later today. (I am abroad).
>>
>> On Dec 28, 2012, at 12:24 AM, Alastair Murray <alastairmurray42 at gmail.com> wrote:
>>
>>> Hi Michael, all,
>>>
>>> make TEST=simple report fails on 7zip for me with undefined reference to `pthread_create' etc.
>>>
>>> I'm surprised that this isn't broken for everyone (on Linux at least), so it is possible this is something to do with my machine, but I don't think so.
>>>
>>> Adding -pthread to LDFLAGS fixes it for me.
>>>
>>> Trivial patch is attached.  Tested on Linux.
>>>
>>> By the way: I was surprised that a benchmark was using threading.  So I tried defining _7ZIP_ST (single-threading) and fixed a compile issue that arose, but it was still calling pthread functions.
>>>
>>> Regards,
>>> Alastair Murray.
>>> <7zip_pthread.patch>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits




More information about the llvm-commits mailing list