https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108494
Alexander Monakov <amonakov at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |amonakov at gcc dot gnu.org --- Comment #2 from Alexander Monakov <amonakov at gcc dot gnu.org> --- (note, the omp_get_num_procs is just the closest dynamic symbol, with libgomp1-debuginfo the full symbol table will be available, and perf output will be more sensible) We don't reuse threads from nested parallel regions. This comment in team.c seems relevant: /* We only allow the reuse of idle threads for non-nested PARALLEL regions. This appears to be implied by the semantics of threadprivate variables, but perhaps that's reading too much into things. Certainly it does prevent any locking problems, since only the initial program thread will modify gomp_threads. */