Bug 114931

Summary: Remove the memory instrumentation code
Product: WebKit Reporter: Benjamin Poulain <benjamin>
Component: Web InspectorAssignee: Benjamin Poulain <benjamin>
Status: RESOLVED FIXED    
Severity: Normal CC: eflews.bot, eric, graouts, gtk-ews, gyuyoung.kim, joepeck, ossy, philn, rego+ews, thakis, timothy, webkit-bug-importer, webkit-ews, xan.lopez
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Patch
none
Patch
none
Patch
none
Patch kling: review+

Description Benjamin Poulain 2013-04-21 19:54:03 PDT
That huge dead code is useless.
Comment 1 Radar WebKit Bug Importer 2013-04-21 19:54:14 PDT
<rdar://problem/13703130>
Comment 2 Benjamin Poulain 2013-04-21 20:06:30 PDT
Created attachment 198983 [details]
Patch
Comment 3 EFL EWS Bot 2013-04-21 20:32:42 PDT
Comment on attachment 198983 [details]
Patch

Attachment 198983 [details] did not pass efl-ews (efl):
Output: http://webkit-queues.appspot.com/results/199016
Comment 4 kov's GTK+ EWS bot 2013-04-21 20:55:18 PDT
Comment on attachment 198983 [details]
Patch

Attachment 198983 [details] did not pass gtk-ews (gtk):
Output: http://webkit-queues.appspot.com/results/55431
Comment 5 Benjamin Poulain 2013-04-21 21:07:02 PDT
Created attachment 198985 [details]
Patch
Comment 6 EFL EWS Bot 2013-04-21 21:17:51 PDT
Comment on attachment 198985 [details]
Patch

Attachment 198985 [details] did not pass efl-ews (efl):
Output: http://webkit-queues.appspot.com/results/181140
Comment 7 Benjamin Poulain 2013-04-21 21:36:51 PDT
Created attachment 198986 [details]
Patch
Comment 8 Benjamin Poulain 2013-04-21 22:04:43 PDT
Created attachment 198987 [details]
Patch
Comment 9 Benjamin Poulain 2013-04-21 22:21:04 PDT
Created attachment 198989 [details]
Patch
Comment 10 kov's GTK+ EWS bot 2013-04-21 22:31:36 PDT
Comment on attachment 198989 [details]
Patch

Attachment 198989 [details] did not pass gtk-ews (gtk):
Output: http://webkit-queues.appspot.com/results/81558
Comment 11 Early Warning System Bot 2013-04-21 22:32:05 PDT
Comment on attachment 198989 [details]
Patch

Attachment 198989 [details] did not pass qt-ews (qt):
Output: http://webkit-queues.appspot.com/results/200010
Comment 12 Early Warning System Bot 2013-04-21 22:37:21 PDT
Comment on attachment 198989 [details]
Patch

Attachment 198989 [details] did not pass qt-wk2-ews (qt-wk2):
Output: http://webkit-queues.appspot.com/results/80224
Comment 13 Benjamin Poulain 2013-04-21 22:37:59 PDT
Created attachment 198990 [details]
Patch
Comment 14 Benjamin Poulain 2013-04-21 22:49:46 PDT
Created attachment 198991 [details]
Patch
Comment 15 Benjamin Poulain 2013-04-21 23:56:00 PDT
Comment on attachment 198991 [details]
Patch

Looks like two sick bots. It builds everywhere else -> moving to review?
Comment 16 Andreas Kling 2013-04-22 03:14:08 PDT
Comment on attachment 198991 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=198991&action=review

This certainly seems like the right thing to do. r=me.

> Source/WebCore/ChangeLog:15
> +        By removing the code, the binary become 1240976 bytes smaller.
> +        Yep, almost 1 Mb, bringing WebCore to the size it has 5 months ago :)

Holy halloumi, Batman!
Comment 17 Timothy Hatcher 2013-04-22 06:05:11 PDT
(In reply to comment #16)
> (From update of attachment 198991 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=198991&action=review
> 
> This certainly seems like the right thing to do. r=me.
> 
> > Source/WebCore/ChangeLog:15
> > +        By removing the code, the binary become 1240976 bytes smaller.
> > +        Yep, almost 1 Mb, bringing WebCore to the size it has 5 months ago :)
> 
> Holy halloumi, Batman!

Nice!
Comment 18 Alexey Proskuryakov 2013-04-22 10:58:00 PDT
Comment on attachment 198991 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=198991&action=review

> Source/WebCore/ChangeLog:24
> +        * CMakeLists.txt:
> +        * GNUmakefile.list.am:
> +        * Modules/webaudio/AudioContext.cpp:
> +        * Modules/webaudio/AudioContext.h:
> +        (AudioContext):
> +        * Modules/webaudio/AudioNode.cpp:
> +        * Modules/webaudio/AudioNode.h:
> +        (AudioNode):

Can you please edit this list to make it shorter/nicer, or even remove it altogether? I can't imagine any use for it in the ChangeLog.
Comment 19 Joseph Pecoraro 2013-04-22 10:58:04 PDT
Comment on attachment 198991 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=198991&action=review

Nice size saving.

> Source/WebCore/inspector/Inspector.json:79
>          "events": [

Unless someone can think of a good reason to leave it in, this should also remove the "addNativeSnapshotChunk" event in the memory domain. The event can no longer be generated by our backend.
Comment 20 Timothy Hatcher 2013-04-22 11:13:57 PDT
There are a handful of protocol events and functions we can remove. I filed that as bug 114118.
Comment 21 Benjamin Poulain 2013-04-22 16:00:41 PDT
Committed r148921: <http://trac.webkit.org/changeset/148921>
Comment 22 Eric Seidel (no email) 2013-04-22 16:43:28 PDT
I'm curious if the size-win you saw was in Debug or Release?
Comment 23 Benjamin Poulain 2013-04-22 17:07:31 PDT
(In reply to comment #22)
> I'm curious if the size-win you saw was in Debug or Release?

Release. My laptop is a little slow for debug builds :)
Comment 24 Eric Seidel (no email) 2013-04-22 23:13:56 PDT
I've filed a bug in Chromium about tracking the effect of this on our binary size:
https://code.google.com/p/chromium/issues/detail?id=234422

Interesting that Nico's data showed this as only 300kb for Chroimum.  I wonder if we're compiling with some clang/gcc flag which WebKit should consider.
Comment 25 Nico Weber 2013-04-22 23:25:41 PDT
(In reply to comment #24)
> I've filed a bug in Chromium about tracking the effect of this on our binary size:
> https://code.google.com/p/chromium/issues/detail?id=234422
> 
> Interesting that Nico's data showed this as only 300kb for Chroimum.  I wonder if we're compiling with some clang/gcc flag which WebKit should consider.

Might just be stripped vs not stripped.
Comment 26 Csaba Osztrogonác 2013-04-23 02:04:51 PDT
(In reply to comment #21)
> Committed r148921: <http://trac.webkit.org/changeset/148921>

FYI: It broke the build on the Apple Windows bots.