keeleysam / tenfourfox

Automatically exported from code.google.com/p/tenfourfox
0 stars 0 forks source link

change all symbols to DWARF2 for great justice/performance #277

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
from Chris, on a 1.33GHz PowerBook,

Sunspider 1.0.2 (I ran these several times, the results were consistent)

==31==
Total: 6800.5ms +/- 1.1%
3d: 878.4ms +/- 2.9%
cube: 381.6ms +/- 6.7%
morph: 212.7ms +/- 3.9%
raytrace: 284.1ms +/- 7.9%

access: 850.0ms +/- 3.3%
binary-trees: 271.0ms +/- 4.0%
fannkuch: 266.1ms +/- 6.7%
nbody: 196.8ms +/- 3.1%
nsieve: 116.1ms +/- 2.5%
bitops: 525.6ms +/- 5.2%
3bit-bits-in-byte: 69.3ms +/- 8.0%
bits-in-byte: 92.3ms +/- 4.1%
bitwise-and: 211.2ms +/- 11.3%
nsieve-bits: 152.8ms +/- 2.2%

controlflow: 70.4ms +/- 5.7%
recursive: 70.4ms +/- 5.7%

crypto: 503.2ms +/- 5.7%
aes: 236.4ms +/- 7.5%
md5: 150.1ms +/- 4.1%
sha1: 116.7ms +/- 15.1%

date: 942.3ms +/- 3.2%
format-tofte: 578.9ms +/- 3.8%
format-xparb: 363.4ms +/- 5.5%

math: 783.5ms +/- 2.2%
cordic: 487.6ms +/- 4.0%
partial-sums: 189.4ms +/- 5.5%
spectral-norm: 106.5ms +/- 7.0%

regexp: 107.5ms +/- 3.4%
dna: 107.5ms +/- 3.4%

string: 2139.6ms +/- 2.6%
base64: 192.9ms +/- 8.1%
fasta: 451.8ms +/- 1.8%
tagcloud: 656.3ms +/- 1.7%
unpack-code: 553.4ms +/- 7.9%
validate-input: 285.2ms +/- 5.7%

==29==
Total: 3951.8ms +/- 1.6%

3d: 661.4ms +/- 3.3%
cube: 269.4ms +/- 3.5%
morph: 181.9ms +/- 9.4%
raytrace: 210.1ms +/- 4.7%

access: 676.6ms +/- 4.5%
binary-trees: 109.0ms +/- 18.1%
fannkuch: 264.5ms +/- 2.4%
nbody: 184.9ms +/- 11.5%
nsieve: 118.2ms +/- 6.7%

bitops: 524.7ms +/- 3.9%
3bit-bits-in-byte: 67.9ms +/- 2.7%
bits-in-byte: 94.6ms +/- 7.5%
bitwise-and: 209.8ms +/- 7.9%
nsieve-bits: 152.4ms +/- 2.8%

controlflow: 68.0ms +/- 5.4%
recursive: 68.0ms +/- 5.4%

crypto: 328.6ms +/- 6.7%
aes: 155.1ms +/- 3.3%
md5: 91.6ms +/- 14.5%
sha1: 81.9ms +/- 24.2%

date: 322.8ms +/- 10.5%
format-tofte: 190.2ms +/- 3.5%
format-xparb: 132.6ms +/- 22.2%

math: 506.1ms +/- 2.8%
cordic: 216.0ms +/- 3.4%
partial-sums: 178.5ms +/- 8.2%
spectral-norm: 111.6ms +/- 10.3%

regexp: 92.8ms +/- 7.0%
dna: 92.8ms +/- 7.0%

string: 770.8ms +/- 3.0%
base64: 98.4ms +/- 7.7%
fasta: 188.1ms +/- 10.4%
tagcloud: 196.6ms +/- 5.1%
unpack-code: 166.6ms +/- 6.5%
validate-input: 121.1ms +/- 5.3%

==24==
Total: 4009.2ms +/- 8.0%

3d: 617.2ms +/- 4.1%
cube: 237.8ms +/- 7.1%
morph: 168.5ms +/- 5.5%
raytrace: 210.9ms +/- 7.8%

access: 669.0ms +/- 3.9%
binary-trees: 109.9ms +/- 17.7%
fannkuch: 274.1ms +/- 2.9%
nbody: 170.9ms +/- 3.3%
nsieve: 114.1ms +/- 14.7%

bitops: 526.1ms +/- 7.0%
3bit-bits-in-byte: 67.9ms +/- 5.3%
bits-in-byte: 98.2ms +/- 8.3%
bitwise-and: 197.6ms +/- 4.5%
nsieve-bits: 162.4ms +/- 18.4%

controlflow: 68.7ms +/- 12.6%
recursive: 68.7ms +/- 12.6%

crypto: 370.6ms +/- 21.1%
aes: 201.0ms +/- 17.6%
md5: 89.2ms +/- 23.4%
sha1: 80.4ms +/- 31.5%

date: 372.2ms +/- 31.4%
format-tofte: 220.3ms +/- 33.0%
format-xparb: 151.9ms +/- 29.5%

math: 527.7ms +/- 18.8%
cordic: 244.8ms +/- 28.5%
partial-sums: 188.6ms +/- 18.7%
spectral-norm: 94.3ms +/- 4.3%

regexp: 86.0ms +/- 3.9%
dna: 86.0ms +/- 3.9%

string: 771.7ms +/- 4.1%
base64: 99.4ms +/- 10.6%
fasta: 252.8ms +/- 7.5%
tagcloud: 178.2ms +/- 5.3%
unpack-code: 143.1ms +/- 5.0%
validate-input: 98.2ms +/- 10.6%

Original issue reported on code.google.com by classi...@floodgap.com on 21 Jun 2014 at 7:54

GoogleCodeExporter commented 9 years ago
Most substantial regressions are as follows. They all suffer, but these are 
substantial.

String: 770 -> 2139 !!
Tagcloud: 196 -> 656
Unpack-Code: 166 -> 553
Cordic: 216 -> 487

First step: interpreter or JIT?

Original comment by classi...@floodgap.com on 21 Jun 2014 at 8:01

GoogleCodeExporter commented 9 years ago
29.0 debug in interpreter only

    "3d-cube": 1073.61,
    "3d-morph": 1236.838,
    "3d-raytrace": 1232.136,
    "access-binary-trees": 590.183,
    "access-fannkuch": 2664.932,
    "access-nbody": 2164.599,
    "access-nsieve": 825.223,
    "bitops-3bit-bits-in-byte": 648.361,
    "bitops-bits-in-byte": 954.507,
    "bitops-bitwise-and": 2051.787,
    "bitops-nsieve-bits": 1283.554,
    "controlflow-recursive": 443.757,
    "crypto-aes": 820.808,
    "crypto-md5": 459.9,
    "crypto-sha1": 470.885,
    "date-format-tofte": 516.659,
    "date-format-xparb": 345.696,
    "math-cordic": 1388.709,
    "math-partial-sums": 1014.669,
    "math-spectral-norm": 609.619,
    "regexp-dna": 39.388,
    "string-base64": 672.295,
    "string-fasta": 836.454,
    "string-tagcloud": 439.836,
    "string-unpack-code": 195.586,
    "string-validate-input": 437.705

Original comment by classi...@floodgap.com on 21 Jun 2014 at 8:06

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
31b2 debug (-GGC) in interpreter only

    "3d-cube": 1048.078,
    "3d-morph": 1069.873,
    "3d-raytrace": 1063.422,
    "access-binary-trees": 613.484,
    "access-fannkuch": 2375.391,
    "access-nbody": 1831.668,
    "access-nsieve": 733.683,
    "bitops-3bit-bits-in-byte": 694.916,
    "bitops-bits-in-byte": 994.332,
    "bitops-bitwise-and": 2002.467,
    "bitops-nsieve-bits": 1303.789,
    "controlflow-recursive": 396.947,
    "crypto-aes": 745.17,
    "crypto-md5": 453.385,
    "crypto-sha1": 465.039,
    "date-format-tofte": 493.731,
    "date-format-xparb": 300.538,
    "math-cordic": 1384.905,
    "math-partial-sums": 926.751,
    "math-spectral-norm": 570.486,
    "regexp-dna": 39.749,
    "string-base64": 619.145,
    "string-fasta": 767.8,
    "string-tagcloud": 387.828,
    "string-unpack-code": 174.977,
    "string-validate-input": 414.518

These numbers are actually generally better across the board, so the problem is 
the JIT. Let's look at tagcloud.

Original comment by classi...@floodgap.com on 21 Jun 2014 at 8:10

GoogleCodeExporter commented 9 years ago
The JIT trace for 31's tagcloud is nearly 600K larger. There's a lot of code 
bloat.

Original comment by classi...@floodgap.com on 21 Jun 2014 at 8:17

GoogleCodeExporter commented 9 years ago
Number of fallbacks is the same, roughly: 
bruce:/home/spectre/Documents/Work Folder/TenFourFox/ SunSpider/SunSpider/% 
grep -c Fallback tagcloud-29*
72674
bruce:/home/spectre/Documents/Work Folder/TenFourFox/ SunSpider/SunSpider/% 
grep -c Fallback tagcloud-31*
72769

Original comment by classi...@floodgap.com on 21 Jun 2014 at 8:21

GoogleCodeExporter commented 9 years ago
Before getting even to the main code, 31 runs a completely different code path 
(trace line 28990). It's a whole bunch of defvars, deffuns, and 
get/set/bindintrinsics. This accounts for a large part of the difference; other 
than VM wrappers, the runtime is identical after that.

Original comment by classi...@floodgap.com on 21 Jun 2014 at 8:38

GoogleCodeExporter commented 9 years ago
I'm not sure where that's coming from, but adding a tweak to our patch to 
counter bug 995336 improves things a LOT!

-    if (!script->ensureHasTypes(cx) || !script->ensureHasAnalyzedArgsUsage(cx))
+    if (!script->ensureHasTypes(cx))
         return Method_Error;

+    if (script->argumentsHasVarBinding()) {
+        if (!script->ensureHasAnalyzedArgsUsage(cx))
+            return Method_Error;
+    }
+

29:
    "3d-cube": 138.825,
    "3d-morph": 123.439,
    "3d-raytrace": 146.579,
    "access-binary-trees": 95.789,
    "access-fannkuch": 109.715,
    "access-nbody": 121.133,
    "access-nsieve": 34.674,
    "bitops-3bit-bits-in-byte": 38.34,
    "bitops-bits-in-byte": 35.958,
    "bitops-bitwise-and": 105.592,
    "bitops-nsieve-bits": 76.689,
    "controlflow-recursive": 25.185,
    "crypto-aes": 101.137,
    "crypto-md5": 58.791,
    "crypto-sha1": 47.21,
    "date-format-tofte": 134.782,
    "date-format-xparb": 117.757,
    "math-cordic": 184.854,
    "math-partial-sums": 116.728,
    "math-spectral-norm": 58.408,
    "regexp-dna": 41.636,
    "string-base64": 65.652,
    "string-fasta": 157.862,
    "string-tagcloud": 153.008,
    "string-unpack-code": 111.418,
    "string-validate-input": 89.604

31:
    "3d-cube": 133.572,
    "3d-morph": 107.703,
    "3d-raytrace": 138.162,
    "access-binary-trees": 76.427,
    "access-fannkuch": 103.156,
    "access-nbody": 118.249,
    "access-nsieve": 35.027,
    "bitops-3bit-bits-in-byte": 42.351,
    "bitops-bits-in-byte": 35.736,
    "bitops-bitwise-and": 66.253,
    "bitops-nsieve-bits": 75.866,
    "controlflow-recursive": 25.925,
    "crypto-aes": 96.593,
    "crypto-md5": 63.734,
    "crypto-sha1": 50.463,
    "date-format-tofte": 129.148,
    "date-format-xparb": 123.118,
    "math-cordic": 277.994,
    "math-partial-sums": 119.483,
    "math-spectral-norm": 62.203,
    "regexp-dna": 41.792,
    "string-base64": 66.424,
    "string-fasta": 179.131,
    "string-tagcloud": 154.654,
    "string-unpack-code": 103.335,
    "string-validate-input": 105.14

Original comment by classi...@floodgap.com on 22 Jun 2014 at 1:52

GoogleCodeExporter commented 9 years ago
We still have this problem where the G5, in non-debug mode, loses nearly 80 
points on V8. (The new build scores 333; opt is barely 250.)

Perhaps this is a problem on other systems too.

Original comment by classi...@floodgap.com on 22 Jun 2014 at 2:38

GoogleCodeExporter commented 9 years ago
switching the G5 to 7450 branching improves things but Splay and RayTrace are 
still about half what they should be. Is Debug mode running different checks?

Original comment by classi...@floodgap.com on 22 Jun 2014 at 2:57

GoogleCodeExporter commented 9 years ago
Or we could be really revolting and just set DEBUG flags on in js ...

Original comment by classi...@floodgap.com on 22 Jun 2014 at 3:00

GoogleCodeExporter commented 9 years ago
Looks like there is a different code path with DEBUG on. The interpreter 
suffers dramatically. Opt build 31b:

    "3d-cube": 869.302,
    "3d-morph": 1314.347,
    "3d-raytrace": 1282.19,
    "access-binary-trees": 1137.145,
    "access-fannkuch": 2704.398,
    "access-nbody": 1892.794,
    "access-nsieve": 975.787,
    "bitops-3bit-bits-in-byte": 497.111,
    "bitops-bits-in-byte": 658.761,
    "bitops-bitwise-and": 2797.21,
    "bitops-nsieve-bits": 1182.093,
    "controlflow-recursive": 604.052,
    "crypto-aes": 1053.962,
    "crypto-md5": 493.447,
    "crypto-sha1": 500.669,
    "date-format-tofte": 661.01,
    "date-format-xparb": 464.136,
    "math-cordic": 1209.805,
    "math-partial-sums": 1089.899,
    "math-spectral-norm": 619.724,
    "regexp-dna": 39.636,
    "string-base64": 756.573,
    "string-fasta": 960.265,
    "string-tagcloud": 559.351,
    "string-unpack-code": 282.245,
    "string-validate-input": 529.802

Original comment by classi...@floodgap.com on 29 Jun 2014 at 2:58

GoogleCodeExporter commented 9 years ago
access-binary-trees DOUBLES. We should look at that.
bitops-bitwise-and goes from 2002 to 2797.
So if we fix the interpreter problem this should get our lost speed back.

Original comment by classi...@floodgap.com on 29 Jun 2014 at 3:00

GoogleCodeExporter commented 9 years ago
Shark trace under the Interpreter for DEBUG between Interp and mcount:

    2.9%    86.4%   js                _ZL9InterpretP9JSContextRN2js8RunStateE   
    1.0%    30.1%   js                 bool js::baseops::SetPropertyHelper<(js::ExecutionMode)0>(js::ExecutionModeTraits<(js::ExecutionMode)0>::ContextType, JS::Handle<JSObject*>, JS::Handle<JSObject*>, JS::Handle<jsid>, js::baseops::QualifiedBool, JS::MutableHandle<JS::Value>, bool)    
    0.3%    21.9%   js                  bool DefinePropertyOrElement<(js::ExecutionMode)0>(js::ExecutionModeTraits<(js::ExecutionMode)0>::ExclusiveContextType, JS::Handle<JSObject*>, JS::Handle<jsid>, bool (*)(JSContext*, JS::Handle<JSObject*>, JS::Handle<jsid>, JS::MutableHandle<JS::Value>), bool (*)(JSContext*, JS::Handle<JSObject*>, JS::Handle<jsid>, bool, JS::Value), unsigned, JS::Handle<JS::MutableHandle>, bool, bool)  
    0.1%    11.0%   js                   bool UpdateShapeTypeAndValue<(js::ExecutionMode)0>(js::ExecutionModeTraits<(js::ExecutionMode)0>::ExclusiveContextType, JSObject*, js::Shape*, JS::Value const&)   
    0.4%    10.4%   js                    JSObject::nativeSetSlotWithType(js::ExclusiveContext*, js::Shape*, JS::Value const&)  
    0.1%    5.4%    js                     js::types::TypeObject::addPropertyType(js::ExclusiveContext*, jsid, JS::Value const&)    
    0.5%    5.2%    js                      _ZL21InlineAddTypePropertyPN2js16ExclusiveContextEPNS_5types10TypeObjectE4jsidNS2_4TypeE    
    0.1%    2.3%    js                       js::types::TypeObject::getProperty(js::ExclusiveContext*, jsid)    
    0.3%    1.4%    js                        js::types::TypeObject::maybeGetProperty(jsid) 
    0.1%    1.0%    js                         js::types::IdToTypeId(jsid)  
    0.0%    0.6%    js                          _ZN7mozilla5RangeIDsEixEm.constprop.754 

For G5 opt:

    0.6%    94.3%   js                    _ZL9InterpretP9JSContextRN2js8RunStateE   
    0.1%    44.6%   js                     _ZL20SetPropertyOperationP9JSContextN2JS6HandleIP8JSScriptEEPhNS2_INS1_5ValueEEES8_  
    0.1%    41.5%   js                      bool js::baseops::SetPropertyHelper<(js::ExecutionMode)0>(js::ExecutionModeTraits<(js::ExecutionMode)0>::ContextType, JS::Handle<JSObject*>, JS::Handle<JSObject*>, JS::Handle<jsid>, js::baseops::QualifiedBool, JS::MutableHandle<JS::Value>, bool)   
    0.1%    25.9%   js                       bool DefinePropertyOrElement<(js::ExecutionMode)0>(js::ExecutionModeTraits<(js::ExecutionMode)0>::ExclusiveContextType, JS::Handle<JSObject*>, JS::Handle<jsid>, bool (*)(JSContext*, JS::Handle<JSObject*>, JS::Handle<jsid>, JS::MutableHandle<JS::Value>), bool (*)(JSContext*, JS::Handle<JSObject*>, JS::Handle<jsid>, bool, JS::Value), unsigned, JS::Handle<JS::MutableHandle>, bool, bool) 
    0.1%    17.1%   js                        js::Shape* JSObject::putProperty<(js::ExecutionMode)0>(js::ExecutionModeTraits<(js::ExecutionMode)0>::ExclusiveContextType, JS::Handle<JSObject*>, JS::Handle<jsid>, bool (*)(JSContext*, JS::Handle<JSObject*>, JS::Handle<jsid>, JS::MutableHandle<JS::Value>), bool (*)(JSContext*, JS::Handle<JSObject*>, JS::Handle<jsid>, bool, JS::MutableHandle), unsigned, unsigned, unsigned)   
    0.1%    13.0%   js                         js::Shape* JSObject::addPropertyInternal<(js::ExecutionMode)0>(js::ExecutionModeTraits<(js::ExecutionMode)0>::ExclusiveContextType, JS::Handle<JSObject*>, JS::Handle<jsid>, bool (*)(JSContext*, JS::Handle<JSObject*>, JS::Handle<jsid>, JS::MutableHandle<JS::Value>), bool (*)(JSContext*, JS::Handle<JSObject*>, JS::Handle<jsid>, bool, JS::MutableHandle), unsigned, unsigned, unsigned, js::Shape**, bool)   
    0.0%    6.1%    js                          JSObject::getChildProperty(js::ExclusiveContext*, JS::Handle<JSObject*>, JS::Handle<js::Shape*>, js::StackShape&)   
    0.0%    2.6%    js                           JSObject::setLastProperty(js::ThreadSafeContext*, JS::Handle<JSObject*>, JS::Handle<js::Shape*>)   
    0.0%    1.4%    js                            JSObject::updateSlotsForSpan(js::ThreadSafeContext*, JS::Handle<JSObject*>, unsigned long, unsigned long) 
    0.0%    0.3%    js                             js::ObjectImpl::initSlotUnchecked(unsigned, JS::Value const&)    
    0.0%    0.1%    js                              js::ObjectImpl::getSlotAddressUnchecked(unsigned) const 
    0.0%    0.0%    js                               js::ObjectImpl::fixedSlots() const 

Original comment by classi...@floodgap.com on 29 Jun 2014 at 10:16

GoogleCodeExporter commented 9 years ago
gprof is not helpful here, the call totals don't add up to anything meaningful. 
So let's see what we can glean from Shark.

Original comment by classi...@floodgap.com on 29 Jun 2014 at 10:22

GoogleCodeExporter commented 9 years ago
Time weighting from DEBUG:

    0.0%    92.9%   js    main  
    0.0%    88.4%   js     _ZL7ProcessP9JSContextP8JSObjectPKcb 
    0.0%    88.3%   js      _ZL13ExecuteScriptP9JSContextN2JS6HandleIP8JSObjectEENS2_IP8JSScriptEEPNS1_5ValueE  
    0.0%    88.3%   js       js::Execute(JSContext*, JS::Handle<JSScript*>, JSObject&, JS::Value*)  
    0.0%    88.3%   js        _ZN2js9RunScriptEP9JSContextRNS_8RunStateE.part.683   
    0.0%    88.3%   js         _ZL9InterpretP9JSContextRN2js8RunStateE  
    0.0%    88.2%   js          js::Invoke(JSContext*, JS::CallArgs, js::MaybeConstruct)    
    0.0%    88.2%   js           js::CallJSNative(JSContext*, bool (*)(JSContext*, unsigned, JS::Value*), JS::CallArgs const&)  
    0.0%    87.5%   js            _ZL3RunP9JSContextjPN2JS5ValueE   
    0.0%    87.5%   js             _ZL13ExecuteScriptP9JSContextN2JS6HandleIP8JSObjectEENS2_IP8JSScriptEEPNS1_5ValueE   
    0.0%    87.5%   js              js::Execute(JSContext*, JS::Handle<JSScript*>, JSObject&, JS::Value*)   
    0.0%    87.5%   js               _ZN2js9RunScriptEP9JSContextRNS_8RunStateE.part.683    
    2.9%    86.4%   js                _ZL9InterpretP9JSContextRN2js8RunStateE   
    1.0%    30.1%   js                 bool js::baseops::SetPropertyHelper<(js::ExecutionMode)0>(js::ExecutionModeTraits<(js::ExecutionMode)0>::ContextType, JS::Handle<JSObject*>, JS::Handle<JSObject*>, JS::Handle<jsid>, js::baseops::QualifiedBool, JS::MutableHandle<JS::Value>, bool)    
    0.3%    21.9%   js                  bool DefinePropertyOrElement<(js::ExecutionMode)0>(js::ExecutionModeTraits<(js::ExecutionMode)0>::ExclusiveContextType, JS::Handle<JSObject*>, JS::Handle<jsid>, bool (*)(JSContext*, JS::Handle<JSObject*>, JS::Handle<jsid>, JS::MutableHandle<JS::Value>), bool (*)(JSContext*, JS::Handle<JSObject*>, JS::Handle<jsid>, bool, JS::Value), unsigned, JS::Handle<JS::MutableHandle>, bool, bool)  
    0.1%    11.0%   js                   bool UpdateShapeTypeAndValue<(js::ExecutionMode)0>(js::ExecutionModeTraits<(js::ExecutionMode)0>::ExclusiveContextType, JSObject*, js::Shape*, JS::Value const&)   
    0.4%    10.4%   js                    JSObject::nativeSetSlotWithType(js::ExclusiveContext*, js::Shape*, JS::Value const&)  
    0.1%    5.4%    js                     js::types::TypeObject::addPropertyType(js::ExclusiveContext*, jsid, JS::Value const&)    
    0.5%    5.2%    js                      _ZL21InlineAddTypePropertyPN2js16ExclusiveContextEPNS_5types10TypeObjectE4jsidNS2_4TypeE    
    0.1%    2.3%    js                       js::types::TypeObject::getProperty(js::ExclusiveContext*, jsid)    
    0.3%    1.4%    js                        js::types::TypeObject::maybeGetProperty(jsid) 
    0.1%    1.0%    js                         js::types::IdToTypeId(jsid)  
    0.0%    0.6%    js                          _ZN7mozilla5RangeIDsEixEm.constprop.754 

Time weighting from G5:

    0.0%    98.4%   js    main  
    0.0%    95.4%   js     _ZL5ShellP9JSContextPN2js3cli12OptionParserEPPc.constprop.396    
    0.0%    94.9%   js      _ZL11ProcessArgsP9JSContextP8JSObjectPN2js3cli12OptionParserE   
    0.0%    94.9%   js       _ZL7ProcessP9JSContextP8JSObjectPKcb   
    0.0%    94.9%   js        _ZL7RunFileP9JSContextN2JS6HandleIP8JSObjectEEPKcP7(short,  (int0_t, bool))   
    0.0%    94.8%   js         _ZL13ExecuteScriptP9JSContextN2JS6HandleIP8JSObjectEENS2_IP8JSScriptEEPNS1_5ValueE   
    0.0%    94.8%   js          js::Execute(JSContext*, JS::Handle<JSScript*>, JSObject&, JS::Value*)   
    0.0%    94.8%   js           _ZN2js13ExecuteKernelEP9JSContextN2JS6HandleIP8JSScriptEER8JSObjectRKNS2_5ValueENS_11ExecuteTypeENS_16AbstractFramePtrEPS9_.constprop.695  
    0.0%    94.8%   js            _ZN2js9RunScriptEP9JSContextRNS_8RunStateE.constprop.721  
    0.0%    94.8%   js             _ZL9InterpretP9JSContextRN2js8RunStateE  
    0.0%    94.7%   js              js::Invoke(JSContext*, JS::CallArgs, js::MaybeConstruct)    
    0.0%    94.5%   js               _ZL3RunP9JSContextjPN2JS5ValueE    
    0.0%    94.5%   js                _ZL13ExecuteScriptP9JSContextN2JS6HandleIP8JSObjectEENS2_IP8JSScriptEEPNS1_5ValueE    
    0.0%    94.5%   js                 js::Execute(JSContext*, JS::Handle<JSScript*>, JSObject&, JS::Value*)    
    0.0%    94.5%   js                  _ZN2js13ExecuteKernelEP9JSContextN2JS6HandleIP8JSScriptEER8JSObjectRKNS2_5ValueENS_11ExecuteTypeENS_16AbstractFramePtrEPS9_.constprop.695   
    0.0%    94.5%   js                   _ZN2js9RunScriptEP9JSContextRNS_8RunStateE.constprop.721   
    0.6%    94.3%   js                    _ZL9InterpretP9JSContextRN2js8RunStateE   
    0.1%    44.6%   js                     _ZL20SetPropertyOperationP9JSContextN2JS6HandleIP8JSScriptEEPhNS2_INS1_5ValueEEES8_  
    0.1%    41.5%   js                      bool js::baseops::SetPropertyHelper<(js::ExecutionMode)0>(js::ExecutionModeTraits<(js::ExecutionMode)0>::ContextType, JS::Handle<JSObject*>, JS::Handle<JSObject*>, JS::Handle<jsid>, js::baseops::QualifiedBool, JS::MutableHandle<JS::Value>, bool)   
    0.1%    25.9%   js                       bool DefinePropertyOrElement<(js::ExecutionMode)0>(js::ExecutionModeTraits<(js::ExecutionMode)0>::ExclusiveContextType, JS::Handle<JSObject*>, JS::Handle<jsid>, bool (*)(JSContext*, JS::Handle<JSObject*>, JS::Handle<jsid>, JS::MutableHandle<JS::Value>), bool (*)(JSContext*, JS::Handle<JSObject*>, JS::Handle<jsid>, bool, JS::Value), unsigned, JS::Handle<JS::MutableHandle>, bool, bool) 
    0.1%    17.1%   js                        js::Shape* JSObject::putProperty<(js::ExecutionMode)0>(js::ExecutionModeTraits<(js::ExecutionMode)0>::ExclusiveContextType, JS::Handle<JSObject*>, JS::Handle<jsid>, bool (*)(JSContext*, JS::Handle<JSObject*>, JS::Handle<jsid>, JS::MutableHandle<JS::Value>), bool (*)(JSContext*, JS::Handle<JSObject*>, JS::Handle<jsid>, bool, JS::MutableHandle), unsigned, unsigned, unsigned)   
    0.1%    13.0%   js                         js::Shape* JSObject::addPropertyInternal<(js::ExecutionMode)0>(js::ExecutionModeTraits<(js::ExecutionMode)0>::ExclusiveContextType, JS::Handle<JSObject*>, JS::Handle<jsid>, bool (*)(JSContext*, JS::Handle<JSObject*>, JS::Handle<jsid>, JS::MutableHandle<JS::Value>), bool (*)(JSContext*, JS::Handle<JSObject*>, JS::Handle<jsid>, bool, JS::MutableHandle), unsigned, unsigned, unsigned, js::Shape**, bool)   
    0.0%    6.1%    js                          JSObject::getChildProperty(js::ExclusiveContext*, JS::Handle<JSObject*>, JS::Handle<js::Shape*>, js::StackShape&)   
    0.0%    2.6%    js                           JSObject::setLastProperty(js::ThreadSafeContext*, JS::Handle<JSObject*>, JS::Handle<js::Shape*>)   
    0.0%    1.4%    js                            JSObject::updateSlotsForSpan(js::ThreadSafeContext*, JS::Handle<JSObject*>, unsigned long, unsigned long) 
    0.0%    0.3%    js                             js::ObjectImpl::initSlotUnchecked(unsigned, JS::Value const&)    
    0.0%    0.1%    js                              js::ObjectImpl::getSlotAddressUnchecked(unsigned) const 
    0.0%    0.0%    js                               js::ObjectImpl::fixedSlots() const 

Original comment by classi...@floodgap.com on 29 Jun 2014 at 10:59

GoogleCodeExporter commented 9 years ago
Is this a compiler settings problem??

Original comment by classi...@floodgap.com on 30 Jun 2014 at 4:19

GoogleCodeExporter commented 9 years ago
Self/total times. Notice the templates! Debug:

    101461.5 μs    101461.5 μs    js  cxa_atexit_wrapper  
    11039.8 μs 1839052.6 μs   js  main    
    67272.4 μs 68275.9 μs js   _ZL10NewContextP9JSRuntime 
    17071.4 μs 1749703.3 μs   js   _ZL7ProcessP9JSContextP8JSObjectPKcb   
    1610231.5 μs   1731628.5 μs   js    _ZL3RunP9JSContextjPN2JS5ValueE   
    36120.5 μs 36120.5 μs js     JS::Rooted<JSObject*>::~Rooted [in-charge]() 
    18057.8 μs 18057.8 μs js     JSObject::getGeneric(JSContext*, JS::Handle<JSObject*>, JS::Handle<JSObject*>, JS::Handle<jsid>, JS::MutableHandle<JS::Value>)   
    18057.8 μs 18057.8 μs js     JSObject::global() const 
    17055.4 μs 17055.4 μs js     PR_GetCurrentThread  
    17054.8 μs 17054.8 μs js     JSFunction::generatorKind() const    
    9029.1 μs  9029.1 μs  js     js::ObjectImpl::nativeGetSlot(unsigned) const    
    4012.7 μs  4012.7 μs  js     JSFunction::getOrCreateScript(JSContext*)    
    1005.8 μs  1005.8 μs  js     _ZL14global_resolveP9JSContextN2JS6HandleIP8JSObjectEENS2_I4jsidEENS1_13MutableHandleIS4_EE  
    1003.1 μs  1003.1 μs  js     JS::ToBoolean(JS::Handle<JS::Value>) 
    1003.3 μs  1003.3 μs  js    PR_GetCurrentThread   
    7023.1 μs  8026.6 μs  js   _ZL15NewGlobalObjectP9JSContextRN2JS18CompartmentOptionsEP12JSPrincipals   
    2007.1 μs  2007.1 μs  js   PR_GetCurrentThread    
    11034.7 μs 13046.1 μs js  _pt_root    

Opt:

    114476.9 μs    114476.9 μs    js  cxa_atexit_wrapper  
    11039.5 μs 10033598.1 μs  js  main    
    242962.0 μs    299176.1 μs    js   _ZL10NewContextP9JSRuntime 
    1005.9 μs  1005.9 μs  js   _PR_CreateThread   
    1003.1 μs  1003.1 μs  js   JS::Value::isObject() const    
    0.0 μs 9721373.5 μs   js   _ZL5ShellP9JSContextPN2js3cli12OptionParserEPPc.constprop.396  
    35121.1 μs 44153.9 μs js    _ZL15NewGlobalObjectP9JSContextRN2JS18CompartmentOptionsEP12JSPrincipals.constprop.371    
    0.0 μs 9676216.6 μs   js    _ZL11ProcessArgsP9JSContextP8JSObjectPN2js3cli12OptionParserE 
    4014.1 μs  4014.1 μs  js     _ZL14BindScriptArgsP9JSContextP8JSObjectPN2js3cli12OptionParserE 
    0.0 μs 9672202.4 μs   js     _ZL7ProcessP9JSContextP8JSObjectPKcb 
    22089.0 μs 9672202.4 μs   js      _ZL7RunFileP9JSContextN2JS6HandleIP8JSObjectEEPKcP7(short,  (int0_t, bool)) 
    5088504.1 μs   9638064.6 μs   js       _ZL3RunP9JSContextjPN2JS5ValueE    
    544668.2 μs    1045198.6 μs   js        JSObject::getGeneric(JSContext*, JS::Handle<JSObject*>, JS::Handle<JSObject*>, JS::Handle<jsid>, JS::MutableHandle<JS::Value>)    
    317011.0 μs    317011.0 μs    js        js::SpecificRootKind<JSObject*, (js::ThingRootKind)0>::rootKind() 
    199652.8 μs    199652.8 μs    js        js::SpecificRootKind<js::Shape*, (js::ThingRootKind)1>::rootKind()    
    139451.9 μs    139451.9 μs    js        js::SpecificRootKind<JSScript*, (js::ThingRootKind)6>::rootKind() 
    123404.7 μs    125411.3 μs    js        js::BarrieredPtr<js::types::TypeObject, unsigned long>::operator->() const    
    93309.8 μs 93309.8 μs js        js::BarrieredPtr<js::BaseShape, unsigned long>::get() const   
    87289.3 μs 101335.3 μs    js        js::Shape::base() const   
    87284.9 μs 87284.9 μs js        js::GCMethods<jsid>::kind()   
    84275.6 μs 94308.1 μs js        js::BarrieredPtr<js::Shape, unsigned long>::operator js::Shape*() const   
    75245.0 μs 111364.7 μs    js        js::ObjectImpl::lastProperty() const  
    64209.3 μs 64209.3 μs js        _ZNK10JSFunction5flagsEv.isra.67  
    60194.5 μs 60194.5 μs js        js::SpecificRootKind<JSFunction*, (js::ThingRootKind)0>::rootKind()   
    58185.0 μs 73234.9 μs js        js::ContextFriendFields::get(JSContext*)  
    54174.4 μs 54174.4 μs js        _ZL20OBJECT_TO_JSVAL_IMPLP8JSObject   
    53177.1 μs 177585.9 μs    js        js::ObjectImpl::getClass() const  
    41132.7 μs 41132.7 μs js        _ZNK2js5types10TypeObject5claspEv.isra.49 
    40131.9 μs 41135.1 μs js        js::GCMethods<js::Shape*>::kind() 
    39128.5 μs 39128.5 μs js        _ZN7mozilla9RangedPtrIDsEC1EPDsS2_S2_.isra.231.constprop.573  
    36119.3 μs 36119.3 μs js        js::gc::Cell::address() const 
    34111.7 μs 34111.7 μs js        js::GCMethods<JS::Value>::kind()  
    34111.6 μs 34111.6 μs js        js::ObjectImpl::numFixedSlots() const 
    33105.5 μs 34108.8 μs js        js::GCMethods<JSObject*>::kind()  
    32102.1 μs 32102.1 μs js        JS::MutableHandle<JS::Value>::fromMarkedLocation(JS::Value*)  
    31097.9 μs 99314.9 μs js        js::InterpreterFrame::script() const  
    31097.5 μs 71223.0 μs js        JSObject::global() const  
    29091.6 μs 29091.6 μs js        js::GCMethods<JSObject*>::initial()   
    28089.7 μs 49157.0 μs js        bool JSObject::is<JSFunction>() const 
    28085.8 μs 28085.8 μs js        JSObject::rootKind()  
    26090.3 μs 33114.0 μs js        js::ValueOperations<JS::Handle<JS::Value> >::isNumber() const 
    26084.7 μs 28090.9 μs js        js::BarrieredPtr<JSObject, unsigned long>::operator JSObject*() const 
    26082.9 μs 33105.1 μs js        js::ValueOperations<JS::Handle<JS::Value> >::toNumber() const 
    25080.8 μs 25080.8 μs js        JS::MutableHandle<JS::Value>::address() const 
    23076.3 μs 23076.3 μs js        js::GCMethods<js::Shape*>::initial()  
    22072.1 μs 22072.1 μs js        bool JSObject::is<js::ProxyObject>() const    
    22070.7 μs 29092.2 μs js        JS::Value::isObject() const   
    21068.1 μs 38123.5 μs js        js::ObjectImpl::isNative() const  
    21067.3 μs 51163.2 μs js        JSFunction::isInterpreted() const 
    21066.6 μs 27086.2 μs js        JS::Rooted<JSScript*>::operator JSScript* const&() const  
    21064.0 μs 21064.0 μs js        _ZL21BOOLEAN_TO_JSVAL_IMPLb   
    18057.5 μs 42134.4 μs js        JS::Rooted<JSObject*>::operator JSObject* const&() const  
    18057.5 μs 25080.8 μs js        JSFunction& JSObject::as<JSFunction>()    
    18055.0 μs 28088.1 μs js        js::ValueOperations<JS::Handle<JS::Value> >::value() const    
    17055.4 μs 17055.4 μs js        _ZNK10JSFunction13nonLazyScriptEv.isra.68 
    15048.4 μs 15048.4 μs js        js::MutableValueOperations<JS::MutableHandle<JS::Value> >::value()    
    14044.9 μs 22071.1 μs js        JS::Handle<JS::Value>::operator JS::Value const&() const  
    13044.1 μs 25083.3 μs js        JSLinearString::range() const 
    13042.3 μs 13042.3 μs js        JS::Value::toObject() const   
    13042.2 μs 17055.2 μs js        js::GCMethods<JSScript*>::kind()  
    13041.7 μs 13041.7 μs js        JSAtom::asPropertyName()  
    13041.0 μs 13041.0 μs js        _ZNK2js16InterpreterFrame3funEv.isra.77   
    12038.5 μs 12038.5 μs js        js::ObjectImpl::fixedSlots() const    
    10032.1 μs 21068.7 μs js        js::gc::Cell::tenuredZoneFromAnyThread() const    
    10031.7 μs 10031.7 μs js        _ZNK2js9BaseShape11compartmentEv.isra.50  
    9029.8 μs  9029.8 μs  js        JS::shadow::Zone::asShadowZone(JS::Zone*) 
    8027.7 μs  21069.6 μs js        JSFunction::getOrCreateScript(JSContext*) 
    8027.2 μs  12041.0 μs js        JSObject::getParent() const   
    8026.5 μs  12039.8 μs js        js::gc::Cell::arenaHeader() const 
    8026.2 μs  8026.2 μs  js        JS::Value::isDouble() const   
    8026.0 μs  19062.0 μs js        JS::Value::setUndefined() 
    8024.2 μs  8024.2 μs  js        _ZNK2JS6shadow4Zone12needsBarrierEv.isra.32   
    7023.3 μs  7023.3 μs  js        _ZNK2js6shadow6Object13numFixedSlotsEv.isra.43    
    6019.7 μs  10032.3 μs js        JS::Value::setInt32(int)  
    6019.7 μs  7023.1 μs  js        js::BarrieredPtr<js::Shape, unsigned long>::operator->() const    
    6019.3 μs  18057.0 μs js        JS::Value::toNumber() const   
    6019.2 μs  37120.9 μs js        js::ObjectImpl::getOps() const    
    5016.6 μs  5016.6 μs  js        JS::Value::isMarkable() const 
    5016.5 μs  11035.9 μs js        js::Shape::slot() const   
    5016.1 μs  20064.8 μs js        JSFunction::hasScript() const 
    5015.9 μs  5015.9 μs  js        JS::Value::toInt32() const    
    5015.9 μs  5015.9 μs  js        _ZNK2js5Shape9maybeSlotEv.isra.53 
    5015.8 μs  8025.8 μs  js        JSFunction::isInterpretedLazy() const 
    4013.4 μs  4013.4 μs  js        _ZNK2js17ThreadSafeContext11isJSContextEv.isra.82 
    4013.2 μs  4013.2 μs  js        js::GetObjectClass(JSObject*) 
    4012.8 μs  8024.8 μs  js        JS::Value::setBoolean(bool)   
    4012.8 μs  4012.8 μs  js        _ZL20JSVAL_TO_OBJECT_IMPL12jsval_layout.isra.12   
    4012.6 μs  4012.6 μs  js        _ZL20JSVAL_IS_OBJECT_IMPL12jsval_layout.isra.9    
    3010.8 μs  4014.5 μs  js        _ZL14global_resolveP9JSContextN2JS6HandleIP8JSObjectEENS2_I4jsidEENS1_13MutableHandleIS4_EE   
    3010.4 μs  3010.4 μs  js        JS::CallArgs::create(unsigned, JS::Value*)    
    3010.2 μs  3010.2 μs  js        _ZNK2js5Class7isProxyEv.isra.34   
    3009.8 μs  17057.0 μs js        JS::Value::setNumber(double)  
    3009.8 μs  3009.8 μs  js        js::detail::ScrambleHashCode(unsigned)    
    3009.5 μs  9029.3 μs  js        js::IsProxy(JSObject*)    
    3009.4 μs  3009.4 μs  js        _ZL23JSVAL_IS_TRACEABLE_IMPL12jsval_layout.isra.16    
    3009.2 μs  5015.9 μs  js        js::ObjectImpl::nativeGetSlot(unsigned) const 
    3009.2 μs  40127.6 μs js        js::ReadBarriered<js::GlobalObject>::get() const  
    3009.0 μs  9028.4 μs  js        JS::Handle<JS::Value>::fromMarkedLocation(JS::Value const*)   
    2007.1 μs  2007.1 μs  js        _ZNK2js5Shape8isNativeEv.isra.51  
    2006.7 μs  2006.7 μs  js        _ZL20JSVAL_IS_DOUBLE_IMPL12jsval_layout.isra.0    
    2006.6 μs  9029.0 μs  js        js::GCMethods<JS::Value>::initial()   
    2006.6 μs  4012.8 μs  js        JS::Value::setNull()  
    2006.5 μs  2006.5 μs  js        js::HandleBase<JS::Value>::extract() const    
    2006.4 μs  214708.5 μs    js        JSObject::getProperty(JSContext*, JS::Handle<JSObject*>, JS::Handle<JSObject*>, js::PropertyName*, JS::MutableHandle<JS::Value>)  
    2006.4 μs  4012.9 μs  js        js::GCMethods<JSFunction*>::kind()    
    2006.4 μs  2006.4 μs  js        unsigned long long mozilla::BitwiseCast<unsigned long long, double>(double)   
    2006.3 μs  2006.3 μs  js        _ZL19JSVAL_TO_INT32_IMPL12jsval_layout.isra.2 
    2006.3 μs  2006.3 μs  js        JS::Value::isInt32() const    
    2006.2 μs  2006.2 μs  js        JS::Value::isNumber() const   
    2006.1 μs  13042.5 μs js        js::ThreadSafeContext::maybeJSContext() const 
    2006.1 μs  3009.5 μs  js        js::ValueOperations<JS::Handle<JS::Value> >::toBoolean() const    
    1005.1 μs  3011.7 μs  js        JS::Value::setObject(JSObject&)   
    1004.8 μs  1004.8 μs  js        _ZL12FileAsStringP9JSContextPKc   
    1003.3 μs  1003.3 μs  js        _ZL20JSVAL_IS_NUMBER_IMPL12jsval_layout.isra.3    
    1003.3 μs  1003.3 μs  js        _ZN7mozilla5RangeIDsEC2EPDsm.constprop.572    
    1003.3 μs  3009.8 μs  js        js::Shape::getObjectParent() const    
    1003.2 μs  1003.2 μs  js        _ZL11BUILD_JSVAL10JSValueTagj.constprop.363   
    1003.2 μs  1003.2 μs  js        js::BarrieredValue::operator JS::Value const&() const 
    1003.2 μs  4013.0 μs  js        js::ObjectImpl::getSlot(unsigned) const   
    1003.0 μs  1003.0 μs  js        _ZL20JSVAL_IS_STRING_IMPL12jsval_layout.isra.5    
    1003.0 μs  1003.0 μs  js        js::GCMethods<js::PropertyName*>::kind()  
    1003.0 μs  3009.1 μs  js        js::ValueOperations<JS::Handle<JS::Value> >::isBoolean() const    
    1003.0 μs  1003.0 μs  js        JS::Handle<JS::Value>::address() const    
    1003.0 μs  1003.0 μs  js        JS::Value::isUndefined() const    
    1002.9 μs  3009.0 μs  js        JS::Value::isNullOrUndefined() const  
    1002.9 μs  1002.9 μs  js        _ZL19INT32_TO_JSVAL_IMPLi 
    0.0 μs 1003.3 μs  js        JS::MutableHandle<JS::Value>::set(JS::Value)  
    4018.1 μs  4018.1 μs  js       JSFunction::getOrCreateScript(JSContext*)  
    3015.5 μs  3015.5 μs  js       _ZL10LoadScriptP9JSContextjPN2JS5ValueEb   
    1003.2 μs  1003.2 μs  js       js::ObjectImpl::fixedSlots() const 
    1003.1 μs  1003.1 μs  js       js::BarrieredPtr<js::Shape, unsigned long>::operator js::Shape*() const    
    1003.1 μs  1003.1 μs  js       js::ObjectImpl::getClass() const   
    1003.0 μs  1003.0 μs  js       js::gc::Cell::arenaHeader() const  
    1002.9 μs  1002.9 μs  js       _ZL9js_mallocm 
    0.0 μs 1003.0 μs  js    js::cli::OptionParser::getBoolOption(char const*) const   
    7020.0 μs  20063.8 μs js  _pt_root    

Original comment by classi...@floodgap.com on 30 Jun 2014 at 4:20

GoogleCodeExporter commented 9 years ago
After a lot of permutations, this was the option in the DEBUG.mozcfg that made 
the difference:

ac_add_options --enable-debug-symbols=-gdwarf-2

I added this to G5.mozcfg and V8 went from 240 to 454, almost 2x improvement. I 
rebuilt the browser with it. Works well. We'll try a 7450 build next and see 
how the iBook likes it.

Original comment by classi...@floodgap.com on 1 Jul 2014 at 1:19

GoogleCodeExporter commented 9 years ago
Looks good on G5, iMac and iBook.

Original comment by classi...@floodgap.com on 2 Jul 2014 at 3:44

GoogleCodeExporter commented 9 years ago
I found a code that may cause this issue.
Effect of -fno-inline option looks very similar to this issue.

==== BEGIN PATCH ====
diff --git a/build/autoconf/compiler-opts.m4 b/build/autoconf/compiler-opts.m4
--- a/build/autoconf/compiler-opts.m4
+++ b/build/autoconf/compiler-opts.m4
@@ -98,17 +98,17 @@ dnl =
 dnl ========================================================
 AC_DEFUN([MOZ_DEBUGGING_OPTS],
 [
 dnl Debug info is ON by default.
 if test -z "$MOZ_DEBUG_FLAGS"; then
   if test -n "$_MSC_VER"; then
     MOZ_DEBUG_FLAGS="-Zi"
   else
-    MOZ_DEBUG_FLAGS="-gdwarf-2 -fno-inline"
+    MOZ_DEBUG_FLAGS="-gdwarf-2"
   fi
 fi

 AC_SUBST(MOZ_DEBUG_FLAGS)

 MOZ_ARG_ENABLE_STRING(debug,
 [  --enable-debug[=DBG]    Enable building with developer debug info
                            (using compiler flags DBG)],
==== END PATCH ====

Original comment by t_mrc...@users.sourceforge.jp on 5 Jul 2014 at 4:01

GoogleCodeExporter commented 9 years ago
That's a very old patch, which is weird. But probably a good idea to pull it 
out anyway.

Original comment by classi...@floodgap.com on 5 Jul 2014 at 5:11

GoogleCodeExporter commented 9 years ago
Umm... I think that line is modified after v29...
Same place on TenFourFox 29 is looks like this:

dnl =
dnl ========================================================
AC_DEFUN([MOZ_DEBUGGING_OPTS],
[
dnl Debug info is ON by default.
if test -z "$MOZ_DEBUG_FLAGS"; then
  MOZ_DEBUG_FLAGS="-g"
fi

MOZ_ARG_ENABLE_STRING(debug,

Original comment by t_mrc...@users.sourceforge.jp on 6 Jul 2014 at 3:01

GoogleCodeExporter commented 9 years ago
I have it fixed in the changesets and we'll see if it sticks. Thanks!

Original comment by classi...@floodgap.com on 6 Jul 2014 at 3:05