[LLVMdev] multithreaded performance disaster with -fprofile-instr-generate (contention on profile counters)
Jonathan Roelofs
jonathan at codesourcery.com
Thu Apr 17 09:45:08 PDT 2014
if (counter_is_local)
counter++
if (counter > threshold)
counter_is_local=false
else
increment_thread_local_counter()
On 4/17/14, 9:39 AM, Kostya Serebryany wrote:
>
>
>
> On Thu, Apr 17, 2014 at 8:37 PM, Jonathan Roelofs <jonathan at codesourcery.com
> <mailto:jonathan at codesourcery.com>> wrote:
>
> How about per-thread if the counter is hot enough?
>
>
> Err. How do you know if the counter is hot w/o first profiling the app?
>
--
Jon Roelofs
jonathan at codesourcery.com
CodeSourcery / Mentor Embedded
More information about the llvm-dev
mailing list