summaryrefslogtreecommitdiff
path: root/compiler/driver/compiler_driver.h
diff options
context:
space:
mode:
author Mathieu Chartier <mathieuc@google.com> 2013-08-23 14:56:59 -0700
committer Mathieu Chartier <mathieuc@google.com> 2013-08-23 16:54:01 -0700
commit0b3eb39f8bc92f955f875ef50929c439aafe35fb (patch)
tree0f0372ed1553f2968a9ed1b046636dcf15667164 /compiler/driver/compiler_driver.h
parent7dfb28c066159e6cde8181720f0c451a700ef966 (diff)
Use atomic integer for compiler driver work balancing.
Before, we divided the work by dividing the total work by the number of threads. This did not balance work well since some threads could finish much earlier than others. The new method uses a shared atomic integer to balance work. This makes it that a thread can process at most one item after the other worker threads are finished. Changed the number of threads to take into account the main thread also doing work. This means that we subtract one from the number of threads when we make the thread pool. Change-Id: I0147b0403c6214800ed6bfcdac4f1e5486330996
Diffstat (limited to 'compiler/driver/compiler_driver.h')
0 files changed, 0 insertions, 0 deletions