Bug 102062 - JSFunction and its descendants should be destructible
Summary: JSFunction and its descendants should be destructible
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Filip Pizlo
URL:
Keywords:
Depends on:
Blocks: 102017
  Show dependency treegraph
 
Reported: 2012-11-13 02:06 PST by Filip Pizlo
Modified: 2012-11-13 12:28 PST (History)
7 users (show)

See Also:


Attachments
the patch (4.66 KB, patch)
2012-11-13 02:10 PST, Filip Pizlo
mhahnenberg: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Filip Pizlo 2012-11-13 02:06:29 PST
This will allow me to put a watchpoint inside them.  Watchpoints currently involve malloc'd data, so it's better if they can be destroyed.  There is the alternative possibility of creating a GCAllocatedWatchpointSet, but I think this is overkill for now.
Comment 1 Filip Pizlo 2012-11-13 02:10:30 PST
Created attachment 173851 [details]
the patch
Comment 2 Mark Hahnenberg 2012-11-13 08:37:04 PST
Comment on attachment 173851 [details]
the patch

r=me
Comment 3 Geoffrey Garen 2012-11-13 10:06:24 PST
Are you sure this isn't a regression on v8-earley or v8-boyer?
Comment 4 Filip Pizlo 2012-11-13 10:08:27 PST
(In reply to comment #3)
> Are you sure this isn't a regression on v8-earley or v8-boyer?

My measurements say that it's not. But I will do another run, just to be sure!
Comment 5 Filip Pizlo 2012-11-13 10:33:16 PST
(In reply to comment #4)
> (In reply to comment #3)
> > Are you sure this isn't a regression on v8-earley or v8-boyer?
> 
> My measurements say that it's not. But I will do another run, just to be sure!

Here are more numbers, showing that it has no effect:


Benchmark report for V8Spider and Octane on wartooth (MacBookPro8,2).

VMs tested:
"TipOfTree" at /Volumes/Data/pizlo/quinary/OpenSource/WebKitBuild/Release/jsc (r134168)
"DestroyFunction" at /Volumes/Data/pizlo/quartary/OpenSource/WebKitBuild/Release/jsc (r134168)

Collected 12 samples per benchmark/VM, with 4 VM invocations per benchmark. Emitted a call to gc()
between sample measurements. Used 1 benchmark iteration per VM invocation for warm-up. Used the
jsc-specific preciseTime() function to get microsecond-level timing. Reporting benchmark execution
times with 95% confidence intervals in milliseconds.

                           TipOfTree              DestroyFunction                                  
V8Spider:
   earley-boyer         65.7398+-0.6453     ?     66.2897+-0.8766        ?

   <arithmetic>         65.7398+-0.6453     ?     66.2897+-0.8766        ? might be 1.0084x slower
   <geometric> *        65.7398+-0.6453     ?     66.2897+-0.8766        ? might be 1.0084x slower
   <harmonic>           65.7398+-0.6453     ?     66.2897+-0.8766        ? might be 1.0084x slower

                           TipOfTree              DestroyFunction                                  
Octane and V8v7:
   boyer               10.05091+-0.11116          9.92526+-0.08145         might be 1.0127x faster

V8v7:
   <arithmetic>        10.05091+-0.11116          9.92526+-0.08145         might be 1.0127x faster
   <geometric> *       10.05091+-0.11116          9.92526+-0.08145         might be 1.0127x faster
   <harmonic>          10.05091+-0.11116          9.92526+-0.08145         might be 1.0127x faster

Octane including V8v7:
   <arithmetic>        10.05091+-0.11116          9.92526+-0.08145         might be 1.0127x faster
   <geometric> *       10.05091+-0.11116          9.92526+-0.08145         might be 1.0127x faster
   <harmonic>          10.05091+-0.11116          9.92526+-0.08145         might be 1.0127x faster

                           TipOfTree              DestroyFunction                                  
All benchmarks:
   <arithmetic>         37.8954+-0.3084     ?     38.1075+-0.4322        ? might be 1.0056x slower
   <geometric>          25.7029+-0.1536           25.6483+-0.1803          might be 1.0021x faster
   <harmonic>           17.4347+-0.1602           17.2642+-0.1207          might be 1.0099x faster

                           TipOfTree              DestroyFunction                                  
Geomean of preferred means:
   <scaled-result>      81.2796+-0.4859           81.1071+-0.5701          might be 1.0021x faster
Comment 6 Filip Pizlo 2012-11-13 11:59:36 PST
Landed in http://trac.webkit.org/changeset/134460
Comment 7 Geoffrey Garen 2012-11-13 12:28:52 PST
> Here are more numbers, showing that it has no effect:

Nice!