This is the mail archive of the
mailing list for the GCC project.
Re: Data race in PGO profile collection for multi-process program
- From: Xinliang David Li <davidxl at google dot com>
- To: Pengfei Yuan <0xcoolypf at gmail dot com>
- Cc: "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>
- Date: Mon, 1 Jun 2015 21:14:40 -0700
- Subject: Re: Data race in PGO profile collection for multi-process program
- Authentication-results: sourceware.org; auth=none
- References: <CACmZjJ+E62UCg3fRzc4uokJh3r5PcNRoA-NGVsyJdN8rryEaXg at mail dot gmail dot com>
Using AutoFDO is one way. For PGO, you may want to to try using
__gcov_dump interface to explicitly control the timing and order of
the profile dump --- i.e., invoke __gcov_dump in main process after
work processes exit and before the main process exits.
On Mon, Jun 1, 2015 at 8:08 PM, Pengfei Yuan <email@example.com> wrote:
> I am trying PGO on Nginx, which has a main process and several worker processes.
> I find that the collected profile data files only contain information
> for the main process, which is probably a data race (the main process
> exits immediately after worker processes exit).
> How can I solve this problem? Should I switch to the sampling-based AutoFDO?
> Yuan, Pengfei