Bill Schmidt <wschm...@linux.vnet.ibm.com> writes: > > My reason for asking involves a large heavily-threaded application that > is improved by feedback-directed optimization on some platforms, but not > on others. One theory is that a defective profile is generated due to > counter dropouts from contention. I'm somewhat skeptical about this > given that some platforms seem to do well with it, but it's possible. > I'm hopeful that knowing why the thread-safe profiling patch wasn't > implemented will give us more of a clue.
Atomics are slower even single threaded. In any case you'll have a gigantic slowdown if there is contention. Better use per thread counters. -Andi -- a...@linux.intel.com -- Speaking for myself only