Closed
Bug 828500
Opened 12 years ago
Closed 12 years ago
BaselineCompiler: Emit spew from IC fallback functions.
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: djvj, Unassigned)
References
(Blocks 1 open bug)
Details
Attachments
(1 file, 1 obsolete file)
(deleted),
patch
|
jandem
:
review+
|
Details | Diff | Splinter Review |
To enable easy identification of slowpaths still left in the system, make all fallback functions spew the script, lineno, and pc.
Reporter | ||
Comment 1•12 years ago
|
||
Pretty starightforward.
Minor note: made UseCount fallback function reset the use count for the script, since it was getting hit way too often, as revealed by the new spew code.
Attachment #699907 -
Flags: review?(jdemooij)
Reporter | ||
Comment 2•12 years ago
|
||
For lack of a better place to put this, a tally of where we're hitting fallbacks across various scripts in SS:
(3d-cube.js:186/1210) GetElem 100
(3d-cube.js:186/1218) GetElem 100
(3d-cube.js:186/412) GetElem 100
(3d-cube.js:186/421) GetElem 100
(3d-cube.js:186/475) GetElem 100
(3d-cube.js:186/484) GetElem 100
(3d-cube.js:186/538) GetElem 100
(3d-cube.js:186/547) GetElem 100
(3d-cube.js:186/601) GetElem 100
(3d-cube.js:186/610) GetElem 100
(3d-cube.js:186/1011) GetElem 104
(3d-cube.js:186/1019) GetElem 104
(3d-cube.js:186/1071) GetElem 104
(3d-cube.js:186/1079) GetElem 104
(3d-cube.js:186/1131) GetElem 104
(3d-cube.js:186/1140) GetElem 104
(3d-cube.js:186/1334) GetElem 104
(3d-cube.js:186/1343) GetElem 104
(3d-cube.js:186/806) GetElem 108
(3d-cube.js:186/815) GetElem 108
(math-spectral-norm.js:6/20) BinaryArith(div) 160
(crypto-aes.js:13/24) NewArray 170
(crypto-aes.js:13/28) NewArray 170
(crypto-aes.js:13/37) NewArray 170
(crypto-aes.js:13/404) Call 170
(crypto-aes.js:13/436) BinaryArith(mod) 170
(crypto-aes.js:13/46) NewArray 170
(crypto-aes.js:13/55) NewArray 170
(crypto-aes.js:13/88) BinaryArith(mod) 170
(3d-cube.js:144/110) NewArray 204
(3d-cube.js:144/129) UnaryArith(neg) 204
(3d-cube.js:144/144) NewArray 204
(3d-cube.js:144/177) NewArray 204
(3d-cube.js:144/77) NewArray 204
(3d-cube.js:144/81) NewArray 204
(3d-cube.js:158/114) NewArray 204
(3d-cube.js:158/143) NewArray 204
(3d-cube.js:158/150) UnaryArith(neg) 204
(3d-cube.js:158/177) NewArray 204
(3d-cube.js:158/77) NewArray 204
(3d-cube.js:158/81) NewArray 204
(3d-cube.js:172/115) NewArray 204
(3d-cube.js:172/148) NewArray 204
(3d-cube.js:172/177) NewArray 204
(3d-cube.js:172/77) NewArray 204
(3d-cube.js:172/81) NewArray 204
(3d-cube.js:172/95) UnaryArith(neg) 204
(3d-cube.js:186/1271) GetElem 204
(3d-cube.js:186/1280) GetElem 204
(3d-cube.js:232/114) GetElem 204
(3d-cube.js:232/122) UnaryArith(neg) 204
(3d-cube.js:232/131) GetElem 204
(3d-cube.js:232/139) UnaryArith(neg) 204
(3d-cube.js:232/148) GetElem 204
(3d-cube.js:232/157) UnaryArith(neg) 204
(3d-cube.js:232/282) GetElem 204
(3d-cube.js:232/298) GetElem 204
(3d-cube.js:232/314) GetElem 204
(3d-cube.js:186/1696) NewArray 208
(3d-cube.js:186/680) GetElem 208
(3d-cube.js:186/689) GetElem 208
(3d-cube.js:186/743) GetElem 208
(3d-cube.js:186/752) GetElem 208
(3d-cube.js:186/7) Call 208
(3d-cube.js:186/869) GetElem 208
(3d-cube.js:186/878) GetElem 208
(crypto-aes.js:83/224) Call 208
(crypto-aes.js:83/227) SetElem 208
(access-fannkuch.js:5/198) GetProp 240
(access-fannkuch.js:5/208) BinaryArith(add) 240
(3d-cube.js:232/67) BinaryArith(add) 244
(crypto-aes.js:164/576) BinaryArith(ursh) 336
(crypto-aes.js:230/515) BinaryArith(ursh) 336
(3d-cube.js:134/0) NewArray 412
(3d-cube.js:134/35) NewArray 412
(3d-cube.js:134/4) NewArray 412
(3d-cube.js:134/66) NewArray 412
(3d-cube.js:134/97) NewArray 412
(3d-raytrace.js:189/523) NewArray 440
(3d-raytrace.js:189/834) ToBool 440
(3d-raytrace.js:75/45) Call 440
(3d-raytrace.js:189/394) GetProp 441
(3d-raytrace.js:189/404) Compare(gt) 441
(3d-raytrace.js:189/164) NewArray 460
(date-format-tofte.js:1/111) Call 500
(date-format-tofte.js:1/144) Call 500
for TypeUpdate 550
(3d-raytrace.js:189/362) Call 795
(crypto-aes.js:83/491) SetElem 832
(3d-raytrace.js:189/281) NewArray 849
(3d-raytrace.js:189/290) UnaryArith(neg) 849
(3d-raytrace.js:189/300) UnaryArith(neg) 849
(3d-raytrace.js:189/311) UnaryArith(neg) 849
(3d-raytrace.js:189/81) Compare(gt) 864
(3d-raytrace.js:189/334) ToBool 893
(3d-raytrace.js:67/45) Call 893
(3d-raytrace.js:405/69) BinaryArith(add) 900
(3d-raytrace.js:405/75) BinaryArith(add) 900
(3d-raytrace.js:405/76) BinaryArith(add) 900
(3d-raytrace.js:189/94) Compare(lt) 932
(string-tagcloud.js:235/46) Compare(eq) 940
(3d-cube.js:96/0) NewArray 1232
(3d-cube.js:96/13) NewArray 1232
(3d-cube.js:96/22) NewArray 1232
(3d-cube.js:96/31) NewArray 1232
(3d-cube.js:96/4) NewArray 1232
(3d-cube.js:115/7) Call 1248
(3d-cube.js:186/76) SetElem 1248
(3d-raytrace.js:71/11) GetElem 1321
(3d-raytrace.js:71/23) GetElem 1321
(3d-raytrace.js:71/36) GetElem 1321
(crypto-aes.js:164/694) GetProp 1343
(crypto-aes.js:164/758) BinaryArith(add) 1343
(crypto-aes.js:230/625) GetProp 1343
(crypto-aes.js:230/681) BinaryArith(add) 1343
(3d-raytrace.js:71/45) Call 1348
(3d-raytrace.js:189/158) ToBool 1353
(date-format-tofte.js:1/21) Compare(eq) 1659
(string-tagcloud.js:235/16) Compare(lt) 1706
(3d-cube.js:232/387) GetElem 1836
(3d-cube.js:232/409) GetElem 1836
(3d-cube.js:108/7) Call 1872
(string-validate-input.js:7/103) BinaryArith(add) 2000
(string-validate-input.js:7/154) BinaryArith(add) 2000
(string-validate-input.js:7/189) BinaryArith(add) 2000
(string-validate-input.js:7/289) BinaryArith(add) 2000
(string-validate-input.js:7/302) GetProp 2000
(string-validate-input.js:7/524) BinaryArith(add) 2000
(string-validate-input.js:7/77) BinaryArith(add) 2000
(crypto-aes.js:47/10) Call 2380
(string-tagcloud.js:231/184) GetProp 2500
(string-tagcloud.js:231/207) GetProp 2500
(string-tagcloud.js:231/217) BinaryArith(add) 2500
(string-tagcloud.js:231/273) BinaryArith(add) 2500
(string-tagcloud.js:231/279) BinaryArith(add) 2500
(string-tagcloud.js:231/295) BinaryArith(add) 2500
(string-tagcloud.js:231/301) BinaryArith(add) 2500
(string-tagcloud.js:231/305) BinaryArith(add) 2500
(string-tagcloud.js:231/311) BinaryArith(add) 2500
(string-tagcloud.js:231/315) BinaryArith(add) 2500
(string-tagcloud.js:231/321) BinaryArith(add) 2500
(string-tagcloud.js:231/325) BinaryArith(add) 2500
(string-tagcloud.js:231/331) BinaryArith(add) 2500
(string-tagcloud.js:231/332) BinaryArith(add) 2500
(crypto-sha1.js:147/48) GetElem 2516
(crypto-sha1.js:147/94) SetElem 2516
(crypto-sha1.js:147/93) BinaryArith(bitor) 2517
(date-format-xparb.js:1/547) Call 2572
(date-format-xparb.js:1/580) Call 2572
(crypto-aes.js:13/120) SetElem 2720
(crypto-aes.js:13/462) SetElem 2720
(3d-cube.js:115/81) SetElem 3744
(crypto-md5.js:201/48) GetElem 3956
(crypto-md5.js:201/85) SetElem 3956
(crypto-md5.js:201/84) BinaryArith(bitor) 3957
(string-fasta.js:44/114) GetProp 4878
(string-fasta.js:44/160) GetProp 4878
(string-fasta.js:44/176) BinaryArith(add) 4878
(bitops-nsieve-bits.js:12/55) SetElem 5000
(bitops-nsieve-bits.js:12/158) BinaryArith(bitand) 5001
(3d-cube.js:91/0) This 5400
(3d-cube.js:91/1) NewArray 5436
(string-validate-input.js:7/397) BinaryArith(add) 6000
(3d-raytrace.js:83/0) NewArray 6085
(date-format-xparb.js:351/49) BinaryArith(add) 6565
(string-tagcloud.js:229/8) Compare(eq) 6613
(3d-cube.js:108/99) SetElem 7488
(string-base64.js:45/107) GetProp 8191
(string-base64.js:45/127) GetElem 8191
(string-base64.js:45/128) BinaryArith(add) 8191
(string-base64.js:45/145) GetProp 8191
(string-base64.js:45/171) GetProp 8191
(string-base64.js:45/192) GetElem 8191
(string-base64.js:45/193) BinaryArith(add) 8191
(string-base64.js:45/210) GetProp 8191
(string-base64.js:45/230) GetElem 8191
(string-base64.js:45/231) BinaryArith(add) 8191
(string-base64.js:45/48) GetProp 8191
(string-base64.js:45/65) GetElem 8191
(string-base64.js:45/66) BinaryArith(add) 8191
(string-base64.js:45/83) GetProp 8191
(string-base64.js:1/178) BinaryArith(add) 8192
(crypto-aes.js:57/21) Call 8840
(crypto-aes.js:57/38) Call 8840
(crypto-aes.js:47/64) SetElem 9520
(crypto-sha1.js:147/53) GetProp 10064
(3d-raytrace.js:160/149) Compare(gt) 11501
(string-validate-input.js:84/18) BinaryArith(add) 12000
(string-validate-input.js:84/19) BinaryArith(add) 12000
(3d-raytrace.js:160/136) Compare(lt) 12601
(crypto-md5.js:201/53) GetProp 15824
(string-validate-input.js:73/64) GetProp 16000
(3d-raytrace.js:244/86) Compare(eq) 16058
(string-fasta.js:44/66) GetProp 18456
(3d-raytrace.js:189/68) Compare(eq) 18942
(date-format-xparb.js:351/11) Call 19467
(date-format-xparb.js:351/22) Compare(eq) 19467
(3d-cube.js:96/167) SetElem 19712
(access-binary-trees.js:16/71) Call 20632
(access-binary-trees.js:16/95) Call 21440
(string-validate-input.js:62/72) BinaryArith(add) 24000
(string-validate-input.js:7/337) GetProp 24000
(string-validate-input.js:7/363) Compare(lt) 24000
(string-validate-input.js:7/378) Compare(gt) 24000
(string-base64.js:86/203) BinaryArith(add) 24576
(string-tagcloud.js:231/77) GetProp 27089
(string-base64.js:86/39) GetProp 32772
(string-base64.js:86/65) GetProp 32772
(string-base64.js:86/85) GetProp 32772
(crypto-aes.js:57/136) SetElem 35360
(crypto-aes.js:57/73) SetElem 35360
(access-binary-trees.js:11/7) Compare(eq) 42072
(3d-morph.js:1/130) SetElem 43200
(math-cordic.js:54/175) BinaryArith(rsh) 100000
(access-nsieve.js:15/31) SetElem 139997
(math-cordic.js:54/116) BinaryArith(rsh) 200000
Reporter | ||
Comment 3•12 years ago
|
||
Table format for above:
(filename:lineno/pc) operation fallback-hit-count
Comment 4•12 years ago
|
||
Comment on attachment 699907 [details] [diff] [review]
Add spew to Baseline IC fallback functions
Review of attachment 699907 [details] [diff] [review]:
-----------------------------------------------------------------
Great, this will be very useful.
Getting the current script is a pretty expensive operation though, we should only do this in debug builds. Maybe add a FallbackSpew function so that you can do:
FallbackSpew(cx, stub, "StackCheck");
And FallbackSpew should just be a no-op if the spew is disabled:
#ifdef DEBUG
if (IonSpewEnabled(IonSpew_BaselineICFallback)) {
Get script, pc and spew.
}
#endif
It would also be nice to print PCToLineNumber(script, pc), to make it easier to track down slow paths.
Attachment #699907 -
Flags: review?(jdemooij)
Reporter | ||
Comment 5•12 years ago
|
||
Addressing review comments for earlier patch.
Attachment #699907 -
Attachment is obsolete: true
Attachment #700731 -
Flags: review?(jdemooij)
Comment 6•12 years ago
|
||
Comment on attachment 700731 [details] [diff] [review]
Second try
Review of attachment 700731 [details] [diff] [review]:
-----------------------------------------------------------------
Nice.
Attachment #700731 -
Flags: review?(jdemooij) → review+
Reporter | ||
Comment 7•12 years ago
|
||
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•