[lld] r285224 - Call _exit.
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 9 21:28:47 PST 2016
I think we could add a new member function to SpecificBumpPtrAllocator to
discard all objects without calling their dtors. Now that almost all
objects are allocated from the pool, so if we call that function before
exiting, exit should be as fast as _exit.
On Wed, Nov 9, 2016 at 9:06 PM, Davide Italiano via llvm-commits <
llvm-commits at lists.llvm.org> wrote:
> On Wed, Oct 26, 2016 at 11:59 AM, Rafael Espindola via llvm-commits
> <llvm-commits at lists.llvm.org> wrote:
> > Author: rafael
> > Date: Wed Oct 26 13:59:00 2016
> > New Revision: 285224
> >
> > URL: http://llvm.org/viewvc/llvm-project?rev=285224&view=rev
> > Log:
> > Call _exit.
> >
> > As the state of lld gets more complicated, shutting down gets more
> > expensive.
> >
> > In a normal lld run we can just call _exit immediately after renaming
> > the temporary output file. We still want the ability to run a full
> > shutdown since that is useful for detecting memory leaks.
> >
> > This patch adds a --full-shutdown flag and changes lit to use it.
> >
>
> Sorry for thread-necromancing.
> A side-effect of this change is that, given we don't call destructors,
> we lose some diagnostic capabilities that I (personally) consider
> important.
> Most notably, -mllvm -time-passes (on an LTO build) won't print
> anything to stdout unless --full-shutdown is passed on the cmdline.
> It's a bit of a POLA violation.
> Considering how long an LTO build of reasonably sized software takes,
> it's not the best user experience, IMHO. Also, understanding why
> nothing is printed is not entirely obvious (need to know about
> --full-shutdown and understand that -time-passes actually prints in
> the destructor [the latter should be more natural to understand, but
> still]).
>
> With that in mind, I'm not sure there's a lot we can do without
> switching the default (which I'm not entirely in favour of). Maybe,
> Rafael, we can document what's the lld default behavior and bring this
> case as an example so that people are less surprised?
>
> Let me know what you think.
>
>
> --
> Davide
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161109/9d5856ae/attachment-0001.html>
More information about the llvm-commits
mailing list