WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
71522
JSC should be able to sample itself in a more flexible way than just sampling flags
https://bugs.webkit.org/show_bug.cgi?id=71522
Summary
JSC should be able to sample itself in a more flexible way than just sampling...
Filip Pizlo
Reported
2011-11-03 17:04:16 PDT
Sampling flags are one of our most precise ways of measuring system overheads. But they are painfully low-level. Numbers from a narrow range need to be ascribed to each region of code being sampled. Hierarchical views of the data are not possible. JSC should have a more general way of doing sampling.
Attachments
the patch
(22.55 KB, patch)
2011-11-03 17:08 PDT
,
Filip Pizlo
barraclough
: review+
webkit-ews
: commit-queue-
Details
Formatted Diff
Diff
the patch
(29.67 KB, patch)
2011-11-03 18:33 PDT
,
Filip Pizlo
no flags
Details
Formatted Diff
Diff
attempting to make stylebot happy
(29.67 KB, patch)
2011-11-03 18:49 PDT
,
Filip Pizlo
webkit-ews
: commit-queue-
Details
Formatted Diff
Diff
the patch
(30.35 KB, patch)
2011-11-03 21:39 PDT
,
Filip Pizlo
webkit-ews
: commit-queue-
Details
Formatted Diff
Diff
the patch
(30.65 KB, patch)
2011-11-03 22:07 PDT
,
Filip Pizlo
no flags
Details
Formatted Diff
Diff
the patch
(29.98 KB, patch)
2011-11-05 17:06 PDT
,
Filip Pizlo
no flags
Details
Formatted Diff
Diff
Show Obsolete
(5)
View All
Add attachment
proposed patch, testcase, etc.
Filip Pizlo
Comment 1
2011-11-03 17:08:30 PDT
Created
attachment 113586
[details]
the patch
WebKit Review Bot
Comment 2
2011-11-03 17:12:27 PDT
Attachment 113586
[details]
did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/JavaScriptCore/ChangeLog', u'Source..." exit_code: 1 Source/JavaScriptCore/bytecode/SamplingTool.cpp:116: Semicolon defining empty statement for this loop. Use { } instead. [whitespace/semicolon] [5] Total errors found: 1 in 14 files If any of these errors are false positives, please file a bug against check-webkit-style.
Gavin Barraclough
Comment 3
2011-11-03 17:29:36 PDT
Comment on
attachment 113586
[details]
the patch One would hope that the SamplingRegion constructors would compile out to no code when the tool isn't enabled, I'm slightly concerned that C compilers might disappoint us yet again and we may need to hide these behind a macro. But if this isn't showing a regression right now then we can cross this bridge when we come to it. Please make the style bot happy.
Early Warning System Bot
Comment 4
2011-11-03 17:41:25 PDT
Comment on
attachment 113586
[details]
the patch
Attachment 113586
[details]
did not pass qt-ews (qt): Output:
http://queues.webkit.org/results/10301023
Filip Pizlo
Comment 5
2011-11-03 18:01:44 PDT
Benchmark report for SunSpider, V8, and Kraken. VMs tested: "TipOfTree" at /Volumes/Data/pizlo/quinary/OpenSource/WebKitBuild/Release/jsc "SamplerDisabled" at /Volumes/Data/pizlo/tertiary/OpenSource/WebKitBuild/Release/jsc 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 SamplerDisabled SunSpider: 3d-cube 7.3373+-0.1676 ? 7.5402+-0.2023 ? might be 1.0276x slower 3d-morph 7.8858+-0.4350 7.6701+-0.1214 might be 1.0281x faster 3d-raytrace 7.7052+-0.2236 ? 7.7302+-0.2359 ? access-binary-trees 1.6188+-0.0617 ? 1.8235+-0.2556 ? might be 1.1264x slower access-fannkuch 6.6048+-0.1505 6.4360+-0.0666 might be 1.0262x faster access-nbody 3.8754+-0.1280 3.8720+-0.2675 access-nsieve 2.6285+-0.0651 ? 2.6426+-0.0746 ? bitops-3bit-bits-in-byte 1.4582+-0.2108 1.2898+-0.0299 might be 1.1306x faster bitops-bits-in-byte 2.5890+-0.3265 2.4182+-0.0688 might be 1.0706x faster bitops-bitwise-and 3.3750+-0.0774 3.2964+-0.0848 might be 1.0238x faster bitops-nsieve-bits 5.5588+-0.1732 5.4807+-0.1309 might be 1.0143x faster controlflow-recursive 2.0926+-0.0466 ? 2.1527+-0.0411 ? might be 1.0287x slower crypto-aes 7.4639+-0.2539 7.4333+-0.2846 crypto-md5 2.8924+-0.3005 2.7691+-0.0627 might be 1.0445x faster crypto-sha1 2.6081+-0.3149 2.4773+-0.0523 might be 1.0528x faster date-format-tofte 10.3030+-0.1220 ? 10.4140+-0.2368 ? might be 1.0108x slower date-format-xparb 9.6536+-0.4447 9.5533+-0.2313 might be 1.0105x faster math-cordic 6.4035+-0.1177 ? 6.6007+-0.1513 ? might be 1.0308x slower math-partial-sums 7.5209+-0.1620 7.4152+-0.1120 might be 1.0142x faster math-spectral-norm 2.6075+-0.0651 ? 2.8063+-0.2938 ? might be 1.0762x slower regexp-dna 11.7749+-0.2294 11.6692+-0.2506 string-base64 4.1195+-0.0678 4.0859+-0.0793 string-fasta 6.3778+-0.1200 ? 6.4210+-0.1934 ? string-tagcloud 11.8547+-0.3299 11.7013+-0.3115 might be 1.0131x faster string-unpack-code 20.3228+-0.2529 ? 20.4651+-0.3966 ? string-validate-input 5.4633+-0.2045 ? 5.4975+-0.6334 ? <arithmetic> * 6.2344+-0.0549 6.2178+-0.0483 <geometric> 5.0487+-0.0630 5.0283+-0.0426 <harmonic> 4.0517+-0.0769 4.0282+-0.0483 TipOfTree SamplerDisabled V8: crypto 74.3128+-0.9020 73.8788+-0.7729 deltablue 166.0901+-1.0659 ? 168.2366+-1.2831 ? might be 1.0129x slower earley-boyer 92.4573+-1.1578 ? 92.8215+-1.5808 ? raytrace 64.6803+-0.5825 ^ 63.0305+-0.8967 ^ definitely 1.0262x faster regexp 106.0170+-0.7636 ? 106.8364+-0.5769 ? richards 125.3932+-1.1442 ? 125.5596+-1.5507 ? splay 74.6375+-1.6237 72.6300+-0.9738 might be 1.0276x faster <arithmetic> 100.5126+-0.3520 100.4276+-0.4048 <geometric> * 95.6339+-0.4187 95.1824+-0.4341 <harmonic> 91.4038+-0.4953 90.6343+-0.4844 TipOfTree SamplerDisabled Kraken: ai-astar 494.8765+-1.8803 ? 495.2137+-5.7539 ? audio-beat-detection 191.7268+-2.5698 190.7898+-2.2471 audio-dft 274.6128+-5.5424 ? 278.7253+-3.5057 ? might be 1.0150x slower audio-fft 124.4653+-1.3180 ? 125.6619+-1.5880 ? audio-oscillator 254.8377+-2.5350 ? 254.9064+-1.9106 ? imaging-darkroom 303.6497+-4.9306 301.3957+-4.1004 imaging-desaturate 224.8186+-1.2112 ? 225.2390+-1.1122 ? imaging-gaussian-blur 560.7655+-3.1460 560.2771+-2.8576 json-parse-financial 58.3449+-0.2732 ^ 57.0138+-0.5403 ^ definitely 1.0233x faster json-stringify-tinderbox 68.8436+-1.0897 ? 70.7401+-0.9181 ? might be 1.0275x slower stanford-crypto-aes 96.7287+-0.8454 95.9089+-1.0740 stanford-crypto-ccm 99.9313+-0.6191 ? 100.8474+-1.3751 ? stanford-crypto-pbkdf2 195.4920+-1.9655 194.3583+-1.3438 stanford-crypto-sha256-iterative 81.1426+-0.6117 80.9516+-0.5244 <arithmetic> * 216.4454+-0.4332 ? 216.5735+-0.6804 ? <geometric> 171.7595+-0.2554 ? 171.8916+-0.3637 ? <harmonic> 137.4784+-0.3473 ? 137.5056+-0.2421 ? TipOfTree SamplerDisabled All benchmarks: <arithmetic> 82.8919+-0.1415 ? 82.9082+-0.2179 ? <geometric> 22.3708+-0.1629 22.3104+-0.1008 <harmonic> 7.1259+-0.1318 7.0850+-0.0822 TipOfTree SamplerDisabled Geomean of preferred means: <scaled-result> 50.5332+-0.1966 50.4183+-0.1507
Gyuyoung Kim
Comment 6
2011-11-03 18:10:42 PDT
Comment on
attachment 113586
[details]
the patch
Attachment 113586
[details]
did not pass efl-ews (efl): Output:
http://queues.webkit.org/results/10285181
Filip Pizlo
Comment 7
2011-11-03 18:33:53 PDT
Created
attachment 113604
[details]
the patch Attempting to fix build.
WebKit Review Bot
Comment 8
2011-11-03 18:35:40 PDT
Attachment 113604
[details]
did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/JavaScriptCore/ChangeLog', u'Source..." exit_code: 1 Source/JavaScriptCore/wtf/Spectrum.h:30: Alphabetical sorting problem. [build/include_order] [4] Total errors found: 1 in 21 files If any of these errors are false positives, please file a bug against check-webkit-style.
Filip Pizlo
Comment 9
2011-11-03 18:43:42 PDT
Overhead of having the profiler enabled... Benchmark report for SunSpider, V8, and Kraken. VMs tested: "TipOfTree" at /Volumes/Data/pizlo/quinary/OpenSource/WebKitBuild/Release/jsc "SamplerEnabled" at /Volumes/Data/pizlo/tertiary/OpenSource/WebKitBuild/Release/jsc 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 SamplerEnabled SunSpider: 3d-cube 7.3679+-0.1703 ? 7.4590+-0.2383 ? might be 1.0124x slower 3d-morph 7.4725+-0.1504 ? 7.5925+-0.0576 ? might be 1.0160x slower 3d-raytrace 7.6587+-0.2328 7.6429+-0.3016 access-binary-trees 1.6238+-0.0567 1.5740+-0.0470 might be 1.0316x faster access-fannkuch 6.3700+-0.1068 ? 6.5848+-0.1303 ? might be 1.0337x slower access-nbody 3.7424+-0.1104 ? 3.8870+-0.2522 ? might be 1.0386x slower access-nsieve 2.5210+-0.0519 ? 2.8163+-0.3102 ? might be 1.1171x slower bitops-3bit-bits-in-byte 1.5631+-0.2876 1.3068+-0.0208 might be 1.1961x faster bitops-bits-in-byte 2.6240+-0.3249 2.3986+-0.0573 might be 1.0940x faster bitops-bitwise-and 3.4415+-0.2594 ? 3.8915+-0.8106 ? might be 1.1308x slower bitops-nsieve-bits 5.2864+-0.0886 ! 5.5972+-0.1628 ! definitely 1.0588x slower controlflow-recursive 2.1253+-0.0662 ? 2.1445+-0.0524 ? crypto-aes 7.3671+-0.2485 ? 7.6204+-0.2110 ? might be 1.0344x slower crypto-md5 2.9912+-0.4327 2.7142+-0.0623 might be 1.1021x faster crypto-sha1 2.4407+-0.0638 ? 2.4656+-0.0732 ? might be 1.0102x slower date-format-tofte 9.8041+-0.2285 ! 10.7834+-0.6929 ! definitely 1.0999x slower date-format-xparb 9.6657+-0.3719 9.1994+-0.3476 might be 1.0507x faster math-cordic 6.3703+-0.0942 ? 7.2613+-0.7985 ? might be 1.1399x slower math-partial-sums 7.3831+-0.1383 ! 7.7335+-0.1846 ! definitely 1.0475x slower math-spectral-norm 2.5657+-0.0528 ? 2.5755+-0.0565 ? regexp-dna 11.4304+-0.2376 ? 11.6031+-0.2032 ? might be 1.0151x slower string-base64 4.0302+-0.0719 ! 4.1909+-0.0839 ! definitely 1.0399x slower string-fasta 6.4095+-0.2201 6.3538+-0.1296 string-tagcloud 11.6069+-0.2982 ? 12.0571+-0.7107 ? might be 1.0388x slower string-unpack-code 20.1409+-0.4080 ? 20.5831+-0.3285 ? might be 1.0220x slower string-validate-input 5.1423+-0.0660 ? 5.3008+-0.1041 ? might be 1.0308x slower <arithmetic> * 6.1210+-0.0359 ! 6.2822+-0.0626 ! definitely 1.0263x slower <geometric> 4.9754+-0.0425 ? 5.0541+-0.0524 ? might be 1.0158x slower <harmonic> 4.0231+-0.0608 4.0126+-0.0465 TipOfTree SamplerEnabled V8: crypto 72.4939+-0.5818 ! 74.2267+-0.5432 ! definitely 1.0239x slower deltablue 163.5958+-0.9325 ! 167.2956+-1.2395 ! definitely 1.0226x slower earley-boyer 90.1187+-1.0230 ? 91.7711+-1.4188 ? might be 1.0183x slower raytrace 62.2410+-0.7072 ? 64.4008+-1.5194 ? might be 1.0347x slower regexp 103.7200+-0.5577 ! 108.1050+-1.2934 ! definitely 1.0423x slower richards 122.8026+-0.4318 ! 126.3099+-0.4679 ! definitely 1.0286x slower splay 72.7751+-1.6500 72.2254+-0.6783 <arithmetic> 98.2496+-0.3347 ! 100.6192+-0.4565 ! definitely 1.0241x slower <geometric> * 93.3145+-0.4245 ! 95.4732+-0.5345 ! definitely 1.0231x slower <harmonic> 89.0397+-0.5060 ! 91.0135+-0.6146 ! definitely 1.0222x slower TipOfTree SamplerEnabled Kraken: ai-astar 480.6611+-1.1364 ! 502.6007+-2.7464 ! definitely 1.0456x slower audio-beat-detection 187.1347+-2.3611 ! 193.3259+-1.8803 ! definitely 1.0331x slower audio-dft 270.5607+-14.2197 266.6992+-2.0169 might be 1.0145x faster audio-fft 121.7067+-0.4497 ! 125.2352+-0.6440 ! definitely 1.0290x slower audio-oscillator 247.5017+-0.9247 ! 254.6660+-1.8414 ! definitely 1.0289x slower imaging-darkroom 295.8450+-3.8644 ! 304.1592+-3.6218 ! definitely 1.0281x slower imaging-desaturate 220.5671+-0.4008 ! 228.1312+-1.4477 ! definitely 1.0343x slower imaging-gaussian-blur 542.6252+-1.5325 ! 559.4707+-1.6266 ! definitely 1.0310x slower json-parse-financial 56.9105+-0.3260 ! 58.8739+-0.8441 ! definitely 1.0345x slower json-stringify-tinderbox 68.2445+-1.3047 ! 69.8170+-0.2335 ! definitely 1.0230x slower stanford-crypto-aes 95.0018+-0.6463 ! 97.2163+-1.1808 ! definitely 1.0233x slower stanford-crypto-ccm 98.5258+-0.5849 ! 100.7550+-0.6774 ! definitely 1.0226x slower stanford-crypto-pbkdf2 190.7435+-0.5386 ! 195.8103+-1.6467 ! definitely 1.0266x slower stanford-crypto-sha256-iterative 78.8713+-0.3829 ! 81.0958+-0.3606 ! definitely 1.0282x slower <arithmetic> * 211.0643+-0.8571 ! 216.9898+-0.3769 ! definitely 1.0281x slower <geometric> 167.8954+-0.4237 ! 172.4017+-0.3524 ! definitely 1.0268x slower <harmonic> 134.6227+-0.3187 ! 138.2633+-0.4525 ! definitely 1.0270x slower TipOfTree SamplerEnabled All benchmarks: <arithmetic> 80.8892+-0.2487 ! 83.0963+-0.1063 ! definitely 1.0273x slower <geometric> 21.9607+-0.1091 ! 22.4033+-0.1296 ! definitely 1.0202x slower <harmonic> 7.0725+-0.1040 7.0594+-0.0798 TipOfTree SamplerEnabled Geomean of preferred means: <scaled-result> 49.3991+-0.1261 ! 50.6752+-0.1888 ! definitely 1.0258x slower
Filip Pizlo
Comment 10
2011-11-03 18:49:02 PDT
Created
attachment 113606
[details]
attempting to make stylebot happy
Early Warning System Bot
Comment 11
2011-11-03 19:12:20 PDT
Comment on
attachment 113606
[details]
attempting to make stylebot happy
Attachment 113606
[details]
did not pass qt-ews (qt): Output:
http://queues.webkit.org/results/10318004
Filip Pizlo
Comment 12
2011-11-03 21:39:58 PDT
Created
attachment 113620
[details]
the patch More build goodness...
Early Warning System Bot
Comment 13
2011-11-03 21:52:43 PDT
Comment on
attachment 113620
[details]
the patch
Attachment 113620
[details]
did not pass qt-ews (qt): Output:
http://queues.webkit.org/results/10318041
Filip Pizlo
Comment 14
2011-11-03 22:07:10 PDT
Created
attachment 113621
[details]
the patch Another build fix attempt.
Filip Pizlo
Comment 15
2011-11-05 17:06:33 PDT
Created
attachment 113768
[details]
the patch Trying to fix Windows.
Filip Pizlo
Comment 16
2011-11-06 03:39:49 PST
Landed in
http://trac.webkit.org/changeset/99374
Martin Robinson
Comment 17
2011-11-06 09:33:59 PST
(In reply to
comment #16
)
> Landed in
http://trac.webkit.org/changeset/99374
this commit seems to be causing a ton of assertion failures in the GTK+ debug bot during JSC regression tests:
http://build.webkit.org/builders/GTK%20Linux%2064-bit%20Debug/builds/27434/steps/jscore-test/logs/actual.html
Martin Robinson
Comment 18
2011-11-06 09:45:50 PST
(In reply to
comment #17
)
> (In reply to
comment #16
) > > Landed in
http://trac.webkit.org/changeset/99374
> > this commit seems to be causing a ton of assertion failures in the GTK+ debug bot during JSC regression tests:
http://build.webkit.org/builders/GTK%20Linux%2064-bit%20Debug/builds/27434/steps/jscore-test/logs/actual.html
Here is the stack trace, if it's useful: Program terminated with signal 11, Segmentation fault. #0 0x00002aae598553dd in WTF::ThreadIdentifierData::identifier () at ../../Source/JavaScriptCore/wtf/ThreadIdentifierDataPthreads.cpp:65 65 ASSERT(m_key != PTHREAD_KEYS_MAX); Thread 1 (Thread 0x2aae5c66b720 (LWP 10183)): #0 0x00002aae598553dd in WTF::ThreadIdentifierData::identifier () at ../../Source/JavaScriptCore/wtf/ThreadIdentifierDataPthreads.cpp:65 #1 0x00002aae59855e4f in WTF::currentThread () at ../../Source/JavaScriptCore/wtf/ThreadingPthreads.cpp:212 #2 0x00002aae5983846f in WTF::initializeMainThread () at ../../Source/JavaScriptCore/wtf/MainThread.cpp:100 #3 0x000000000040f5ea in main (argc=6, argv=0x7fff35896bb8) at ../../Source/JavaScriptCore/jsc.cpp:408
Filip Pizlo
Comment 19
2011-11-06 16:35:58 PST
(In reply to
comment #18
)
> (In reply to
comment #17
) > > (In reply to
comment #16
) > > > Landed in
http://trac.webkit.org/changeset/99374
> > > > this commit seems to be causing a ton of assertion failures in the GTK+ debug bot during JSC regression tests:
http://build.webkit.org/builders/GTK%20Linux%2064-bit%20Debug/builds/27434/steps/jscore-test/logs/actual.html
> > Here is the stack trace, if it's useful: > > Program terminated with signal 11, Segmentation fault. > #0 0x00002aae598553dd in WTF::ThreadIdentifierData::identifier () at ../../Source/JavaScriptCore/wtf/ThreadIdentifierDataPthreads.cpp:65 > 65 ASSERT(m_key != PTHREAD_KEYS_MAX); > > Thread 1 (Thread 0x2aae5c66b720 (LWP 10183)): > #0 0x00002aae598553dd in WTF::ThreadIdentifierData::identifier () at ../../Source/JavaScriptCore/wtf/ThreadIdentifierDataPthreads.cpp:65 > #1 0x00002aae59855e4f in WTF::currentThread () at ../../Source/JavaScriptCore/wtf/ThreadingPthreads.cpp:212 > #2 0x00002aae5983846f in WTF::initializeMainThread () at ../../Source/JavaScriptCore/wtf/MainThread.cpp:100 > #3 0x000000000040f5ea in main (argc=6, argv=0x7fff35896bb8) at ../../Source/JavaScriptCore/jsc.cpp:408
Well that's unfortunate. :-( Tracking this here:
https://bugs.webkit.org/show_bug.cgi?id=71643
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug