Hi everybody, I'm currently using d8 (the standalone version of the v8), and I'm trying to understand what's the meaning of the output when the flag --trace_opt is on, and when the flag --trace_deopt is on, but I'm having some trouble to fully understand it.
Here is the first part of the output, using the --trace_opt flag: [disabled optimization for 0x1f065a249961 <SharedFunctionInfo SAR>, reason: Call to a JavaScript runtime function] [disabled optimization for 0x1f065a248471 <SharedFunctionInfo ADD>, reason: Call to a JavaScript runtime function] [disabled optimization for 0x1f065a249499 <SharedFunctionInfo BIT_AND>, reason: Call to a JavaScript runtime function] [disabled optimization for 0x1f065a249bc9 <SharedFunctionInfo SHR>, reason: Call to a JavaScript runtime function] [disabled optimization for 0x1f065a249241 <SharedFunctionInfo BIT_OR>, reason: Call to a JavaScript runtime function] [disabled optimization for 0x1f065a2497c9 <SharedFunctionInfo SHL>, reason: Call to a JavaScript runtime function] [disabled optimization for 0x1f065a248cb9 <SharedFunctionInfo MUL>, reason: Call to a JavaScript runtime function] [disabled optimization for 0x1f065a249631 <SharedFunctionInfo BIT_XOR>, reason: Call to a JavaScript runtime function] [disabled optimization for 0x1f065a248a61 <SharedFunctionInfo SUB>, reason: Call to a JavaScript runtime function] [marking 0x2b5748934b69 <JS Function intAt (SharedFunctionInfo 0x2b574892f709)> for recompilation, reason: small function, ICs with typeinfo: 4/5 (80%), generic ICs: 1/5 (20%)] [compiling method 0x2b5748934b69 <JS Function intAt (SharedFunctionInfo 0x2b574892f709)> using Crankshaft] My questions are: 1) Why does the first nine lines (all the disabled optimization lines) are always printed? I can read that the reason is "Call to a JavaScript runtime function", but does this mean that every runtime function optimization will be disabled? 2) The following line (the one that starts with [marking...]) has "ICs with typeinfo", "generic ICs" information besides the "reason" information, and I guess this is the type information that was gathered by the full compiler. But how is this information gathered? Is this done through the profiler? Below is a part of the output, using the --trace_deopt flag: [deoptimizing (DEOPT soft): begin 0x2b8d27c35581 <JS Function bnpDivRemTo (SharedFunctionInfo 0x2b8d27c30381)> (opt #8) @63, FP to SP delta: 208] ;;; deoptimize at 9660: Insufficient type feedback for generic named access reading input frame bnpDivRemTo => node=4, args=778, height=20; inputs: 0: 0x2b8d27c35581 ; (frame function) 0x2b8d27c35581 <JS Function bnpDivRemTo (SharedFunctionInfo 0x2b8d27c30381)> 1: 0x329334048439 ; [fp + 40] 0x329334048439 <a BigInteger with map 0x99d6b605701> 2: 0x329334046041 ; [fp + 32] 0x329334046041 <a BigInteger with map 0x99d6b605701> 3: 0x34f71f04101 ; [fp + 24] 0x34f71f04101 <null> 4: 0x329334048439 ; [fp - 56] 0x329334048439 <a BigInteger with map 0x99d6b605701> 5: 0x2b8d27c04101 ; [fp - 24] 0x2b8d27c04101 <FixedArray[137]> 6: 0x34f71f041b9 ; (literal 7) 0x34f71f041b9 <undefined> 7: 0x34f71f041b9 ; (literal 7) 0x34f71f041b9 <undefined> 8: 0x3293340daf19 ; [fp - 64] 0x3293340daf19 <a BigInteger with map 0x99d6b605701> 9: 0 ; (int) [fp - 72] 10: 0 ; (int) [fp - 80] 11: 0x34f71f041b9 ; (literal 7) 0x34f71f041b9 <undefined> 12: 12 ; (int) [fp - 88] 13: 37 ; (int) [fp - 96] 14: 0x3293340daf49 ; [fp - 32] 0x3293340daf49 <JS Array[38]> 15: 0xa52619300000000 ; [fp - 48] 173171091 16: 0x34f71f041b9 ; (literal 7) 0x34f71f041b9 <undefined> 17: 1.550117e+00 ; (double) [fp - 200] 18: 5.774636e-09 ; (double) [fp - 208] 19: 0x1000000000 ; (literal 14) 16 20: 73 ; (int) [fp - 120] 21: 36 ; (int) [fp - 128] 22: 0x3293340db1e1 ; [fp - 136] 0x3293340db1e1 <a BigInteger with map 0x99d6b605701> 23: 0x329334048469 ; [fp - 144] 0x329334048469 <JS Array[75]> 24: 0x34f71f041b9 ; (literal 7) 0x34f71f041b9 <undefined> translating frame bnpDivRemTo => node=778, height=152 0x7fff5fbff338: [top + 208] <- 0x329334048439 ; 0x329334048439 <a BigInteger with map 0x99d6b605701> (input #1) 0x7fff5fbff330: [top + 200] <- 0x329334046041 ; 0x329334046041 <a BigInteger with map 0x99d6b605701> (input #2) 0x7fff5fbff328: [top + 192] <- 0x34f71f04101 ; 0x34f71f04101 <null> (input #3) 0x7fff5fbff320: [top + 184] <- 0x329334048439 ; 0x329334048439 <a BigInteger with map 0x99d6b605701> (input #4) 0x7fff5fbff318: [top + 176] <- 0x256ebd920497 ; caller's pc 0x7fff5fbff310: [top + 168] <- 0x7fff5fbff358 ; caller's fp 0x7fff5fbff308: [top + 160] <- 0x2b8d27c04101 ; context 0x2b8d27c04101 <FixedArray[137]> (input #5) 0x7fff5fbff300: [top + 152] <- 0x2b8d27c35581 ; function 0x2b8d27c35581 <JS Function bnpDivRemTo (SharedFunctionInfo 0x2b8d27c30381)> (input #0) 0x7fff5fbff2f8: [top + 144] <- 0x34f71f041b9 ; 0x34f71f041b9 <undefined> (input #6) 0x7fff5fbff2f0: [top + 136] <- 0x34f71f041b9 ; 0x34f71f041b9 <undefined> (input #7) 0x7fff5fbff2e8: [top + 128] <- 0x3293340daf19 ; 0x3293340daf19 <a BigInteger with map 0x99d6b605701> (input #8) 0x7fff5fbff2e0: [top + 120] <- 0x00000000 ; 0 (input #9) 0x7fff5fbff2d8: [top + 112] <- 0x00000000 ; 0 (input #10) 0x7fff5fbff2d0: [top + 104] <- 0x34f71f041b9 ; 0x34f71f041b9 <undefined> (input #11) 0x7fff5fbff2c8: [top + 96] <- 0xc00000000 ; 12 (input #12) 0x7fff5fbff2c0: [top + 88] <- 0x2500000000 ; 37 (input #13) 0x7fff5fbff2b8: [top + 80] <- 0x3293340daf49 ; 0x3293340daf49 <JS Array[38]> (input #14) 0x7fff5fbff2b0: [top + 72] <- 0xa52619300000000 ; 173171091 (input #15) 0x7fff5fbff2a8: [top + 64] <- 0x34f71f041b9 ; 0x34f71f041b9 <undefined> (input #16) 0x7fff5fbff2a0: [top + 56] <- 0x34f71f04359 ; 0x34f71f04359 <Odd Oddball> (input #17) 0x7fff5fbff298: [top + 48] <- 0x34f71f04359 ; 0x34f71f04359 <Odd Oddball> (input #18) 0x7fff5fbff290: [top + 40] <- 0x1000000000 ; 16 (input #19) 0x7fff5fbff288: [top + 32] <- 0x4900000000 ; 73 (input #20) 0x7fff5fbff280: [top + 24] <- 0x2400000000 ; 36 (input #21) 0x7fff5fbff278: [top + 16] <- 0x3293340db1e1 ; 0x3293340db1e1 <a BigInteger with map 0x99d6b605701> (input #22) 0x7fff5fbff270: [top + 8] <- 0x329334048469 ; 0x329334048469 <JS Array[75]> (input #23) 0x7fff5fbff268: [top + 0] <- 0x34f71f041b9 ; 0x34f71f041b9 <undefined> (input #24) [deoptimizing (soft): end 0x2b8d27c35581 <JS Function bnpDivRemTo (SharedFunctionInfo 0x2b8d27c30381)> @63 => node=778, pc=0x256ebd907e83, state=NO_REGISTERS, alignment=no padding, took 0.360 ms] Materialization [0x7fff5fbff2a0] <- 0x3293340db651 ; 0x3293340db651 <Number: 1.55012> Materialization [0x7fff5fbff298] <- 0x3293340db661 ; 0x3293340db661 <Number: 5.77464e-09> [removing optimized code for: bnpDivRemTo] This is the output that I'm having more trouble to understand. My question would be: 3) Could anyone roughly explain what this output means? The 24 numbers, the hexadecimal numbers, with the [top + X] values, for instance. I understand that at the end, it explains that there's some code removed for the function. Thanks for the help, Ignacio. -- -- v8-users mailing list v8-users@googlegroups.com http://groups.google.com/group/v8-users --- You received this message because you are subscribed to the Google Groups "v8-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to v8-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.