<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>148639</bug_id>
          
          <creation_ts>2015-08-31 11:08:18 -0700</creation_ts>
          <short_desc>[CMake] Build with Debug Fission on by default on Debug builds</short_desc>
          <delta_ts>2015-09-15 06:49:48 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebKitGTK</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>131177</dependson>
    
    <dependson>149161</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Carlos Alberto Lopez Perez">clopez</reporter>
          <assigned_to name="Carlos Alberto Lopez Perez">clopez</assigned_to>
          <cc>achristensen</cc>
    
    <cc>cgarcia</cc>
    
    <cc>gyuyoung.kim</cc>
    
    <cc>mcatanzaro</cc>
    
    <cc>mrobinson</cc>
    
    <cc>ossy</cc>
    
    <cc>zan</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1122220</commentid>
    <comment_count>0</comment_count>
    <who name="Carlos Alberto Lopez Perez">clopez</who>
    <bug_when>2015-08-31 11:08:18 -0700</bug_when>
    <thetext>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</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1122224</commentid>
    <comment_count>1</comment_count>
    <who name="Carlos Alberto Lopez Perez">clopez</who>
    <bug_when>2015-08-31 11:24:15 -0700</bug_when>
    <thetext>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&apos;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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1122235</commentid>
    <comment_count>2</comment_count>
      <attachid>260302</attachid>
    <who name="Carlos Alberto Lopez Perez">clopez</who>
    <bug_when>2015-08-31 11:46:16 -0700</bug_when>
    <thetext>Created attachment 260302
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1122238</commentid>
    <comment_count>3</comment_count>
    <who name="Martin Robinson">mrobinson</who>
    <bug_when>2015-08-31 11:50:54 -0700</bug_when>
    <thetext>Can you comment on compiler requirements? Does our minimum supported compiler also support debug fission?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1122245</commentid>
    <comment_count>4</comment_count>
    <who name="Carlos Alberto Lopez Perez">clopez</who>
    <bug_when>2015-08-31 12:07:47 -0700</bug_when>
    <thetext>(In reply to comment #3)
&gt; Can you comment on compiler requirements? Does our minimum supported
&gt; 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&apos;t be a problem.
I also tested this with Clang (version 3.6) and it worked without problems.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1122246</commentid>
    <comment_count>5</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2015-08-31 12:09:55 -0700</bug_when>
    <thetext>(In reply to comment #3)
&gt; Can you comment on compiler requirements? Does our minimum supported
&gt; 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&apos;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</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1122271</commentid>
    <comment_count>6</comment_count>
      <attachid>260302</attachid>
    <who name="Carlos Alberto Lopez Perez">clopez</who>
    <bug_when>2015-08-31 13:28:37 -0700</bug_when>
    <thetext>Comment on attachment 260302
Patch

Clearing flags on attachment: 260302

Committed r189179: &lt;http://trac.webkit.org/changeset/189179&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1122272</commentid>
    <comment_count>7</comment_count>
    <who name="Carlos Alberto Lopez Perez">clopez</who>
    <bug_when>2015-08-31 13:28:44 -0700</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>260302</attachid>
            <date>2015-08-31 11:46:16 -0700</date>
            <delta_ts>2015-08-31 13:28:37 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>bug-148639-20150831204559.patch</filename>
            <type>text/plain</type>
            <size>1563</size>
            <attacher name="Carlos Alberto Lopez Perez">clopez</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogMTg5MTc4CmRpZmYgLS1naXQgYS9Tb3VyY2UvY21ha2UvT3B0
aW9uc0NvbW1vbi5jbWFrZSBiL1NvdXJjZS9jbWF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