[BOLT][Instrumentation] Don't share counters when using append-pid
authorDenis Revunov <revunov.denis@huawei-partners.com>
Thu, 15 Jun 2023 15:43:04 +0000 (15:43 +0000)
committerDenis Revunov <rnovds@gmail.com>
Thu, 29 Jun 2023 22:03:52 +0000 (01:03 +0300)
commit02c3724d43840339fdc91d21747e96b5f7405bb0
treeb35cb52e62a1911ab734b6db3858f8e5cee502fe
parent8f7c53ef81c17ae9d773818181d04ef1c3890912
[BOLT][Instrumentation] Don't share counters when using append-pid

The point of append-pid option is to record separate profiles for
separate forks, which is impossible when counters are the same for
every process. It leads to a sum of all profiles in every file, plus
GlobalWriteProfileMutex located in a shared memory prevents some
processes from dumping their data at all.

Reviewed By: rafauler, Amir
Differential Revision: https://reviews.llvm.org/D153771
bolt/runtime/instr.cpp