summaryrefslogtreecommitdiff
path: root/plugins/elf
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2018-06-04 17:58:34 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2018-06-04 17:58:48 (GMT)
commit1f2b71e31326a5bc021785888cd2203010acf4e6 (patch)
treeb82fd64f1137a09553aa2cb513f974e1308e3022 /plugins/elf
parenta7f73441a0d466824798a421f369628db0184030 (diff)
Defined the number of threads to run from a centralized function.
Diffstat (limited to 'plugins/elf')
-rw-r--r--plugins/elf/symbols.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/plugins/elf/symbols.c b/plugins/elf/symbols.c
index 1b47616..949e495 100644
--- a/plugins/elf/symbols.c
+++ b/plugins/elf/symbols.c
@@ -36,6 +36,7 @@
#include <common/sort.h>
#include <core/global.h>
#include <core/logs.h>
+#include <core/nproc.h>
#include <format/symiter.h>
#include <mangling/demangler.h>
@@ -597,7 +598,7 @@ static void add_all_elf_symbols(GElfFormat *format, phys_t sym_start, size_t cou
sym_size = ELF_SIZEOF_SYM(format);
- runs_count = g_get_num_processors();
+ runs_count = get_max_online_threads();
run_size = count / runs_count;
@@ -1013,7 +1014,7 @@ static bool load_elf_relocations(GElfFormat *format, const elf_phdr *dynamic, el
queue = get_work_queue();
- runs_count = g_get_num_processors();
+ runs_count = get_max_online_threads();
run_size = length / runs_count;