[PATCH] D29960: [PGO] Delay directory creation until write time

Xinliang David Li via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 14 13:15:15 PST 2017


On Tue, Feb 14, 2017 at 1:11 PM, Vedant Kumar <vsk at apple.com> wrote:

>
> > On Feb 14, 2017, at 1:09 PM, Xinliang David Li <davidxl at google.com>
> wrote:
> >
> >
> >
> > On Tue, Feb 14, 2017 at 1:04 PM, Rong Xu via Phabricator <
> reviews at reviews.llvm.org> wrote:
> > xur added a comment.
> >
> > why limit to merge mode?
> > non-merge mode also exhibits the problem mentioned.
> >
> > It will affect the external behavior of non-merge case -- as file
> truncation also needs to be delayed.
>
> (^) This is the key point.
>
> We can't delay file truncation, because a program with shared libraries
> loaded, e.g would have multiple atexit handlers which truncate/write
> profiles, clobbering each other.
>
>
yes -- but this problem is probably solvable, though can be tricky.  Anyway
we won't touch it in this patch.

David



>
> >  Also this is relevant only for users that use profiling APIs which are
> mostly using merge mode.
>
> Also true.
>
> vedant
>
> >
> > If there is a strong need to handle non-merge case, we can do this as a
> followup.
> >
> > David
> >
> >
> >
> > https://reviews.llvm.org/D29960
> >
> >
> >
> >
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170214/1671fe47/attachment.html>


More information about the llvm-commits mailing list