[PATCH][gdbsupport] Use task size in parallel_for_each

Tom de Vries tdevries@suse.de
Sat Jul 23 06:51:55 GMT 2022


On 7/22/22 23:21, Tom Tromey wrote:
> Tom> Then, rather than using parallel_for, the DWARF reader could send N jobs
> Tom> to the thread pool, and each job would simply take the next available CU
> Tom> by incrementing an atomic counter.  When the counter reached the number
> Tom> of CUs, a job would stop.
> 
> Here's a patch.  I didn't test it much, though according to "maint time 1",
> it is ~10% faster on gdb itself.  I pushed it as "t/work-stealing" on my
> github as well, in case you want to try it out.
> 

I've tried it out (initially didn't build for me with gcc 7.5.0, but it 
did after using gcc 12.1.1).

So, the same libxul experiment as before, gcc-12, O2, base commit 
5ae3df226b1.

---

base commit:

real: 4.64
real: 4.10
real: 4.11
real: 4.65
real: 4.04
real: 4.21
real: 4.03
real: 4.48
real: 4.04
real: 4.65

t/work-stealing:

real: 3.65
real: 3.58
real: 3.58
real: 3.58
real: 3.58
real: 3.57
real: 3.58
real: 3.59
real: 3.59
real: 3.59

size heuristics:

real: 3.44
real: 3.44
real: 3.52
real: 3.43
real: 3.54
real: 3.47
real: 3.60
real: 3.46
real: 3.46
real: 3.52

Just one data point of course.

Thanks,
- Tom



More information about the Gdb-patches mailing list