Bug 148639 - [CMake] Build with Debug Fission on by default on Debug builds
Summary: [CMake] Build with Debug Fission on by default on Debug builds
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Carlos Alberto Lopez Perez
URL:
Keywords:
Depends on: 131177 149161
Blocks:
  Show dependency treegraph
 
Reported: 2015-08-31 11:08 PDT by Carlos Alberto Lopez Perez
Modified: 2015-09-15 06:49 PDT (History)
7 users (show)

See Also:


Attachments
Patch (1.53 KB, patch)
2015-08-31 11:46 PDT, Carlos Alberto Lopez Perez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Carlos Alberto Lopez Perez 2015-08-31 11:08:18 PDT
We are having some issues on the GTK Debug buildbots. The bots are running out of RAM sometimes.

On bug 131177 support for building with Debug Fission was added.

Now I suggest to enable this by default when building the Debug build.

I have measured the memory usage of building with and without this option for the Debug build:

* Without Debug fission:
  Max memory usage by the linker = 10.2 GB


* With Debug fission:
  Max memory usage by the linker = 7.8 GB

Not it only reduces the amount of RAM required to build WebKit in 2.4GB, but it also builds faster.


Concerns about Debug Fission builds breaking ccache were sorted out with ccache 3.2.3  https://ccache.samba.org/releasenotes.html#_ccache_3_2_3
Comment 1 Carlos Alberto Lopez Perez 2015-08-31 11:24:15 PDT
Some more stats:

* Rebuilding the Debug build from ccache without Debug fission:
  - Time to build = 06m:42s
  - Size of WebKitBuild/Debug = 16GB


* Rebuilding the Debug build from ccache with Debug fission:
  - Time to build = 04m:05s
  - Size of WebKitBuild/Debug = 8.9G


The time to build is mostly linking time, since I'm rebuilding from previously generated ccache DB. And this is on a system with an SSD. On a system with a rotational media it will probably improve build times further.

Its also nice that the size of the build output has been reduced (almost to half). This will help to save disk space also.
Comment 2 Carlos Alberto Lopez Perez 2015-08-31 11:46:16 PDT
Created attachment 260302 [details]
Patch
Comment 3 Martin Robinson 2015-08-31 11:50:54 PDT
Can you comment on compiler requirements? Does our minimum supported compiler also support debug fission?
Comment 4 Carlos Alberto Lopez Perez 2015-08-31 12:07:47 PDT
(In reply to comment #3)
> Can you comment on compiler requirements? Does our minimum supported
> compiler also support debug fission?

According to https://gcc.gnu.org/wiki/DebugFission it is implemented on GCC 4.7

We already require GCC 4.9, so this shouldn't be a problem.
I also tested this with Clang (version 3.6) and it worked without problems.
Comment 5 Michael Catanzaro 2015-08-31 12:09:55 PDT
(In reply to comment #3)
> Can you comment on compiler requirements? Does our minimum supported
> compiler also support debug fission?

Clang has supported debug fission for a while now. GCC has supported it since 4.7 [1] and nowadays we require 4.8 or 4.9, depending on who you ask :), so we're good. It makes debug builds dramatically faster, especially incremental builds, so I agree it should be on by default.

[1] http://gcc.gnu.org/wiki/DebugFission
Comment 6 Carlos Alberto Lopez Perez 2015-08-31 13:28:37 PDT
Comment on attachment 260302 [details]
Patch

Clearing flags on attachment: 260302

Committed r189179: <http://trac.webkit.org/changeset/189179>
Comment 7 Carlos Alberto Lopez Perez 2015-08-31 13:28:44 PDT
All reviewed patches have been landed.  Closing bug.