]> granicus.if.org Git - llvm/commit
Support: Don't set RLIMIT_AS on child processes when applying a memory limit
authorDavid Blaikie <dblaikie@gmail.com>
Mon, 12 Jun 2017 22:16:49 +0000 (22:16 +0000)
committerDavid Blaikie <dblaikie@gmail.com>
Mon, 12 Jun 2017 22:16:49 +0000 (22:16 +0000)
commita17d9bc6eda9f8c736ab1c5ec4d4dbf3f9218b07
tree4d089eee7e7191f2b26a39e5c9efa9f89a558ae4
parentb94805cb8af857409691244c848667ff39b628f5
Support: Don't set RLIMIT_AS on child processes when applying a memory limit

It doesn't seem relevant to set an address space limit - this isn't
important in any sense that I'm aware & it gets in the way of things
that use a lot of address space, like llvm-symbolizer.

This came up when I realized that bugpoint regression tests were much
slower with -gsplit-dwarf than plain -g. Turned out that bugpoint
subprocesses (opt, etc) were crashing and doing symbolization - but
bugpoint runs those subprocesses with a 400MB memory limit. So with
plain -g, mmaping the opt binary would exceed the memory limit, fail,
and thus be really fast - no symbolization occurred. Whereas with
-gsplit-dwarf, comically, having less to map in, it would succeed and
then spend lots of time symbolizing.

I've fixed at least the critical part of bugpoint's perf problem there
by adding an option to allow bugpoint to disable symbolization. Thus
improving the perfromance for -gsplit-dwarf and making the -g-esque
speed available without this quirk/accidental benefit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305242 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Support/Unix/Program.inc