Comment #2 on issue 1782 by [email protected]: mjsunit/debug-step-3
failing
http://code.google.com/p/v8/issues/detail?id=1782
Running the test in a loop
#!/bin/bash
COUNTER=0
while [ $COUNTER -lt 1000 ]; do
echo The counter is $COUNTER
/usr/local/google/home/sgjesse/v8/git/out/arm.debug/d8
--enable-slow-asserts --debug-code --verify-heap --expose-debug-as debug
/usr/local/google/home/sgjesse/v8/git/test/mjsunit/mjsunit.js
/usr/local/google/home/sgjesse/v8/git/test/mjsunit/debug-step-3.js --test
let COUNTER=COUNTER+1
done
hits the failure once in a while. The ARM simulator seems to be hitting it
most often - about 1 out of 10 on my machine.
Adding --trace-deopt shows the difference - the replacing of the full code
does not happen (line with "Replacing code" is missing).
Output from failing run with --trace-deopt:
[deoptimize all contexts]
[deoptimize context: 30c55b09]
[forced deoptimization: ScriptLocationFromLine / 30c5969d]
[forced deoptimization: ScriptBreakPoint.matchesScript / 30c6cf85]
[forced deoptimization: Debug.setScriptBreakPoint / 30c6d3a9]
[forced deoptimization: ScriptLocationFromPosition / 30c59655]
[deoptimize context: 30c48199]
[forced deoptimization: valueOf / 30c52021]
[forced deoptimization: IsPrimitive / 30c4c8f9]
[forced deoptimization: toString / 30c51bf1]
[forced deoptimization: FunctionSourceString / 30c4c14d]
[forced deoptimization: Instantiate / 30c52195]
**** DEOPT: Debug.setScriptBreakPoint at bailout #17, address 0x4fe3a7d0,
frame size 72
[deoptimizing (lazy): begin 0x30c6d3a9 Debug.setScriptBreakPoint @17]
translating Debug.setScriptBreakPoint => node=145, height=12
0xf74f4e30: [top + 52] <- 0x30c7985d ; [esp + 4] 0x30c7985d <an Object>
0xf74f4e2c: [top + 48] <- 0x30c08091 <undefined> ; literal
0xf74f4e28: [top + 44] <- 0x30c08091 <undefined> ; literal
0xf74f4e24: [top + 40] <- 0x30c08091 <undefined> ; literal
0xf74f4e20: [top + 36] <- 0x30c08091 <undefined> ; literal
0xf74f4e1c: [top + 32] <- 0x30c08091 <undefined> ; literal
0xf74f4e18: [top + 28] <- 0x30c08091 <undefined> ; literal
0xf74f4e14: [top + 24] <- 0x4fe59e54 ; caller's pc
0xf74f4e10: [top + 20] <- 0xf74f4e3c ; caller's fp
0xf74f4e0c: [top + 16] <- 0x30c55b09 ; context
0xf74f4e08: [top + 12] <- 0x30c6d3a9 ; function
0xf74f4e04: [top + 8] <- 0x30c7c601 ; [esp + 8] 0x30c7c601 <a
ScriptBreakPoint>
0xf74f4e00: [top + 4] <- 16 ; [esp + 0] (smi)
0xf74f4dfc: [top + 0] <- 0x30c6e485 ; [esp + 12] 0x30c6e485 <JS
array[18]>
[deoptimizing: end 0x30c6d3a9 Debug.setScriptBreakPoint => node=145,
pc=0x4fe5a190, state=NO_REGISTERS, took 0.135 ms]
2
/usr/local/google/home/sgjesse/v8/git/test/mjsunit/mjsunit.js:166: Failure:
expected <4> found <2>
throw new MjsUnitAssertionError(message);
^
Error:
at new MjsUnitAssertionError
(/usr/local/google/home/sgjesse/v8/git/test/mjsunit/mjsunit.js:31:16)
at fail
(/usr/local/google/home/sgjesse/v8/git/test/mjsunit/mjsunit.js:166:11)
at assertEquals
(/usr/local/google/home/sgjesse/v8/git/test/mjsunit/mjsunit.js:235:7)
at
/usr/local/google/home/sgjesse/v8/git/test/mjsunit/debug-step-3.js:75:1
Output from successful run with --trace-deopt:
[deoptimize all contexts]
[deoptimize context: 47d55b09]
[forced deoptimization: ScriptLocationFromLine / 47d5969d]
[forced deoptimization: ScriptBreakPoint.matchesScript / 47d6cf85]
[forced deoptimization: Debug.setScriptBreakPoint / 47d6d3a9]
[forced deoptimization: ScriptLocationFromPosition / 47d59655]
[deoptimize context: 47d48199]
[forced deoptimization: valueOf / 47d52021]
[forced deoptimization: IsPrimitive / 47d4c8f9]
[forced deoptimization: toString / 47d51bf1]
[forced deoptimization: FunctionSourceString / 47d4c14d]
[forced deoptimization: Instantiate / 47d52195]
Replacing code 53555720 - 53555890 (368) with 535588e0 - 53558a80 (416) for
debugging, changing pc from 535557d0 to 535589a8
**** DEOPT: Debug.setScriptBreakPoint at bailout #17, address 0x5353a7d0,
frame size 72
[deoptimizing (lazy): begin 0x47d6d3a9 Debug.setScriptBreakPoint @17]
translating Debug.setScriptBreakPoint => node=145, height=12
0xf7438e30: [top + 52] <- 0x47d7985d ; [esp + 4] 0x47d7985d <an Object>
0xf7438e2c: [top + 48] <- 0x47d08091 <undefined> ; literal
0xf7438e28: [top + 44] <- 0x47d08091 <undefined> ; literal
0xf7438e24: [top + 40] <- 0x47d08091 <undefined> ; literal
0xf7438e20: [top + 36] <- 0x47d08091 <undefined> ; literal
0xf7438e1c: [top + 32] <- 0x47d08091 <undefined> ; literal
0xf7438e18: [top + 28] <- 0x47d08091 <undefined> ; literal
0xf7438e14: [top + 24] <- 0x53559e54 ; caller's pc
0xf7438e10: [top + 20] <- 0xf7438e3c ; caller's fp
0xf7438e0c: [top + 16] <- 0x47d55b09 ; context
0xf7438e08: [top + 12] <- 0x47d6d3a9 ; function
0xf7438e04: [top + 8] <- 0x47d7c601 ; [esp + 8] 0x47d7c601 <a
ScriptBreakPoint>
0xf7438e00: [top + 4] <- 16 ; [esp + 0] (smi)
0xf7438dfc: [top + 0] <- 0x47d6e485 ; [esp + 12] 0x47d6e485 <JS
array[18]>
[deoptimizing: end 0x47d6d3a9 Debug.setScriptBreakPoint => node=145,
pc=0x5355a190, state=NO_REGISTERS, took 0.131 ms]
[deoptimize all contexts]
[deoptimize context: 47d55b09]
[forced deoptimization: Debug.findScriptSourcePosition / 47d6d1a1]
[forced deoptimization: ScriptBreakPoint.set / 47d6cfa9]
[forced deoptimization: ScriptBreakPoint.matchesScript / 47d6cf85]
[forced deoptimization: Debug.setScriptBreakPoint / 47d6d3a9]
[forced deoptimization: Debug.setScriptBreakPointById / 47d6d3cd]
[forced deoptimization: ScriptLocationFromPosition / 47d59655]
[forced deoptimization: Debug.setBreakPoint / 47d6d221]
[deoptimize context: 47d48199]
**** DEOPT: ScriptBreakPoint.set at bailout #34, address 0x5354e5ec, frame
size 68
[deoptimizing (lazy): begin 0x47d6cfa9 ScriptBreakPoint.set @34]
translating ScriptBreakPoint.set => node=267, height=28
0xf7438df8: [top + 48] <- 0x47d67ebd ; [esp + 88] 0x47d67ebd <a
ScriptBreakPoint>
0xf7438df4: [top + 44] <- 0x47d7c379 ; [esp + 84] 0x47d7c379 <a Script
value = 0x47d71981 <Script>>
0xf7438df0: [top + 40] <- 0x5355cf6c ; caller's pc
0xf7438dec: [top + 36] <- 0xf7438e14 ; caller's fp
0xf7438de8: [top + 32] <- 0x47d55b09 ; context
0xf7438de4: [top + 28] <- 0x47d6cfa9 ; function
0xf7438de0: [top + 24] <- 0x47d08091 <undefined> ; literal
0xf7438ddc: [top + 20] <- 0x47d08091 <undefined> ; literal
0xf7438dd8: [top + 16] <- 0x00000074 ; [esp + 56] 58
0xf7438dd4: [top + 12] <- 0x47d08091 <undefined> ; literal
0xf7438dd0: [top + 8] <- 0x00000000 ; [esp + 32] 0
0xf7438dcc: [top + 4] <- 0x00001330 ; [esp + 24] 2456
0xf7438dc8: [top + 0] <- 0x00001334 ; r0 2458
[deoptimizing: end 0x47d6cfa9 ScriptBreakPoint.set => node=267,
pc=0x5353c144, state=TOS_REG, took 0.125 ms]
**** DEOPT: Debug.setScriptBreakPoint at bailout #16, address 0x5355cf7c,
frame size 16
[deoptimizing (lazy): begin 0x47d6d3a9 Debug.setScriptBreakPoint @16]
translating Debug.setScriptBreakPoint => node=145, height=12
0xf7438e34: [top + 52] <- 0x47d7985d ; [esp + 56] 0x47d7985d <an Object>
0xf7438e30: [top + 48] <- 0x00000000 ; [esp + 52] 0
0xf7438e2c: [top + 44] <- 0x00000024 ; [esp + 48] 18
0xf7438e28: [top + 40] <- 0x00000074 ; [esp + 44] 58
0xf7438e24: [top + 36] <- 0x00000000 ; [esp + 40] 0
0xf7438e20: [top + 32] <- 0x47d08091 ; [esp + 36] 0x47d08091 <undefined>
0xf7438e1c: [top + 28] <- 0x47d08091 ; [esp + 32] 0x47d08091 <undefined>
0xf7438e18: [top + 24] <- 0x5355cb3c ; caller's pc
0xf7438e14: [top + 20] <- 0xf7438e40 ; caller's fp
0xf7438e10: [top + 16] <- 0x47d55b09 ; context
0xf7438e0c: [top + 12] <- 0x47d6d3a9 ; function
0xf7438e08: [top + 8] <- 0x47d67ebd ; [esp + 12] 0x47d67ebd <a
ScriptBreakPoint>
0xf7438e04: [top + 4] <- 16 ; [esp + 0] (smi)
0xf7438e00: [top + 0] <- 0x47d6e725 ; [esp + 4] 0x47d6e725 <JS
array[18]>
[deoptimizing: end 0x47d6d3a9 Debug.setScriptBreakPoint => node=145,
pc=0x5355a190, state=NO_REGISTERS, took 0.113 ms]
**** DEOPT: Debug.setScriptBreakPointById at bailout #4, address
0x5355cb4c, frame size 0
[deoptimizing (lazy): begin 0x47d6d3cd Debug.setScriptBreakPointById @4]
translating Debug.setScriptBreakPointById => node=30, height=4
0xf7438e5c: [top + 40] <- 0x47d7985d ; [esp + 36] 0x47d7985d <an Object>
0xf7438e58: [top + 36] <- 0x00000024 ; [esp + 32] 18
0xf7438e54: [top + 32] <- 0x00000074 ; [esp + 28] 58
0xf7438e50: [top + 28] <- 0x00000000 ; [esp + 24] 0
0xf7438e4c: [top + 24] <- 0x47d08091 ; [esp + 20] 0x47d08091 <undefined>
0xf7438e48: [top + 20] <- 0x47d08091 ; [esp + 16] 0x47d08091 <undefined>
0xf7438e44: [top + 16] <- 0x5350bc28 ; caller's pc
0xf7438e40: [top + 12] <- 0xf7438e6c ; caller's fp
0xf7438e3c: [top + 8] <- 0x47d55b09 ; context
0xf7438e38: [top + 4] <- 0x47d6d3cd ; function
0xf7438e34: [top + 0] <- 0x00000004 ; r0 2
[deoptimizing: end 0x47d6d3cd Debug.setScriptBreakPointById => node=30,
pc=0x53559e58, state=TOS_REG, took 0.088 ms]
**** DEOPT: Debug.setBreakPoint at bailout #40, address 0x5355b190, frame
size 56
[deoptimizing (lazy): begin 0x47d6d221 Debug.setBreakPoint @40]
translating Debug.setBreakPoint => node=207, height=32
0xf7438ee0: [top + 64] <- 0x47d7985d ; [esp + 88] 0x47d7985d <an Object>
0xf7438edc: [top + 60] <- 0x47d71bfd ; [esp + 84] 0x47d71bfd <JS
Function f>
0xf7438ed8: [top + 56] <- 0x00000006 ; [esp + 80] 3
0xf7438ed4: [top + 52] <- 0x47d08091 ; [esp + 76] 0x47d08091 <undefined>
0xf7438ed0: [top + 48] <- 0x47d08091 ; [esp + 72] 0x47d08091 <undefined>
0xf7438ecc: [top + 44] <- 0x5350bc28 ; caller's pc
0xf7438ec8: [top + 40] <- 0xf7438ef0 ; caller's fp
0xf7438ec4: [top + 36] <- 0x47d55b09 ; context
0xf7438ec0: [top + 32] <- 0x47d6d221 ; function
0xf7438ebc: [top + 28] <- 0x47d67e79 ; [esp + 8] 0x47d67e79 <a
SourceLocation>
0xf7438eb8: [top + 24] <- 2456 ; [esp + 12] (smi)
0xf7438eb4: [top + 20] <- 0x00001330 ; [esp + 48] 2456
0xf7438eb0: [top + 16] <- 0x47d08091 <undefined> ; literal
0xf7438eac: [top + 12] <- 0x47d7c379 ; [esp + 40] 0x47d7c379 <a Script
value = 0x47d71981 <Script>>
0xf7438ea8: [top + 8] <- 0x47d08091 <undefined> ; literal
0xf7438ea4: [top + 4] <- 0x47d08091 <undefined> ; literal
0xf7438ea0: [top + 0] <- 0x00000004 ; r0 2
[deoptimizing: end 0x47d6d221 Debug.setBreakPoint => node=207,
pc=0x5355604c, state=TOS_REG, took 0.666 ms]
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev