diff options
author | Tom de Vries <tdevries@suse.de> | 2022-07-19 17:01:21 +0200 |
---|---|---|
committer | Tom de Vries <tdevries@suse.de> | 2022-07-21 15:06:40 +0200 |
commit | e76289d2b374fe1242fc998d572d046be2a4fc8f (patch) | |
tree | 708b15ad5cc9afbadfb59695879a8d9298206fae | |
parent | 3240a7e7340c89fcfe386e02bf1db1f0bd9541cb (diff) | |
download | gdb-e76289d2b374fe1242fc998d572d046be2a4fc8f.zip gdb-e76289d2b374fe1242fc998d572d046be2a4fc8f.tar.gz gdb-e76289d2b374fe1242fc998d572d046be2a4fc8f.tar.bz2 |
[gdb/symtab] Use task size in parallel for in process_queueusers/vries/process-queue-parallel
-rw-r--r-- | gdb/dwarf2/read.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c index c0d6521..b279db3 100644 --- a/gdb/dwarf2/read.c +++ b/gdb/dwarf2/read.c @@ -7624,6 +7624,14 @@ process_queue (dwarf2_per_objfile *per_objfile) using iter_type = decltype (per_objfile->queue->begin ()); using result_type = int; + std::function<unsigned int (iter_type)> task_size + = [=] (iter_type iter) + { + dwarf2_queue_item &item = *iter; + dwarf2_per_cu_data *per_cu = item.per_cu; + return per_cu->length (); + }; + /* The queue starts out with one item, but following a DIE reference may load a new CU, adding it to the end of the queue. */ while (!per_objfile->queue->empty ()) @@ -7642,7 +7650,7 @@ process_queue (dwarf2_per_objfile *per_objfile) } return result_type (1); - }); + }, &task_size); for (int i = 0; i < nr_to_be_processed; ++i) { |