search for: userfunc

Displaying 3 results from an estimated 3 matches for "userfunc".

Did you mean: user_func
2014 Apr 18
2
[LLVMdev] multithreaded performance disaster with -fprofile-instr-generate (contention on profile counters)
...er*sizeof(uint64)); > atomic_store(&shardmask, newcount-1, memory_order_release); > } > shardunlock(); > } > ... > } > > > If we go with this scheme, for tid I would do: __thread threadid; int pthread_create(...) { threadid = goohhash(gettid()); ... } void userfunc() { int tid = threadid+1; threadid = tid; // use tid in profiling ... } This avoids the problem of potentially expensive gettid(), and avoids a possible persistent interference between tids. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://...
2014 Apr 18
2
[LLVMdev] multithreaded performance disaster with -fprofile-instr-generate (contention on profile counters)
...... >>> } >>> >>> >>> >> If we go with this scheme, for tid I would do: >> >> __thread threadid; >> >> int pthread_create(...) >> { >> threadid = goohhash(gettid()); >> ... >> } >> >> void userfunc() >> { >> int tid = threadid+1; >> threadid = tid; >> > > Kostya noted that this increment is a bad idea. Because each thread will > access all possible cache lines for each counter. I agree, this is a bad > idea. > > What bothers me is that if we d...
2014 Apr 18
4
[LLVMdev] multithreaded performance disaster with -fprofile-instr-generate (contention on profile counters)
On Apr 17, 2014, at 2:04 PM, Chandler Carruth <chandlerc at google.com> wrote: > On Thu, Apr 17, 2014 at 1:27 PM, Justin Bogner <mail at justinbogner.com> wrote: > Chandler Carruth <chandlerc at google.com> writes: > > if (thread-ID != main's thread-ID && shard_count < std::min(MAX, NUMBER_OF_CORES)) { > > shard_count = std::min(MAX,