After patch:
```
luyahan@plct-dev-7:~/source/node $ git diff HEAD^
diff --git a/deps/v8/src/builtins/builtins-definitions.h 
b/deps/v8/src/builtins/builtins-definitions.h
index c793ef521f..175acbd495 100644
--- a/deps/v8/src/builtins/builtins-definitions.h
+++ b/deps/v8/src/builtins/builtins-definitions.h
@@ -190,7 +190,7 @@ namespace internal {
   /* Baseline Compiler */                                                      
\
   ASM(BaselineOutOfLinePrologue, BaselineOutOfLinePrologue)                    
\
   ASM(BaselineOutOfLinePrologueDeopt, Void)                                    
\
-  ASM(BaselineOnStackReplacement, BaselineOnStackReplacement)                  
\
+  ASM(BaselineOnStackReplacement, OnStackReplacement)                          
\
   ASM(BaselineLeaveFrame, BaselineLeaveFrame)                                  
\
   ASM(BaselineOrInterpreterEnterAtBytecode, Void)                              
\
   ASM(BaselineOrInterpreterEnterAtNextBytecode, Void)                          
\

```
The riscv issue be fixed. But in my understanding, OnStackReplacementDescriptor 
is the same as BaselineOnStackReplacementDescriptor.

Lu Yahan




> 2023年3月27日 17:15,Leszek Swirski <lesz...@chromium.org> 写道:
> 
> Lazy deopts in general happen due to dependency invalidation (see all those 
> "marking dependent code" traces). The lazy deopt bailouts then happen when 
> the code is running on the stack at the time when the dependency is 
> invalidated -- otherwise the code is just silently discarded in the 
> background. This could simply be a timing issue, perhaps to do with 
> concurrent compilation or GC timing changing due to different code sizes. 
> Have you tried with `--single-threaded`?
> 
> On Mon, Mar 27, 2023 at 11:04 AM Yahan Lu <ya...@iscas.ac.cn> wrote:
> I want to know why it bailout by reason UNKNOW but arm64 dones't bailout? How 
> to debug it?
> 
> 在2023年3月27日星期一 UTC+8 16:43:06<Yahan Lu> 写道:
> I am debugging https://bugs.chromium.org/p/v8/issues/detail?id=13836.
> I add v8 options --trace-opt  --trace_deopt_verbose 
> and riscv64 output:
> all riscv64 log
> [optimizing 0x003f8d902749 <JSFunction nextPart (sfi = 0x3f8dc84c89)> (target 
> TURBOFAN) - took 0.070, 3.101, 0.122 ms] [completed optimizing 0x003f8d902749 
> <JSFunction nextPart (sfi = 0x3f8dc84c89)> (target TURBOFAN)] [marking 
> dependent code 0x003f8e1217c1 (0x003f8dbfc659 <SharedFunctionInfo 
> readPackageScope>) (opt id 6) for deoptimization, reason: code dependencies] 
> [deoptimize marked code in all contexts] [bailout (kind: deopt-lazy, reason: 
> (unknown)): begin. deoptimizing 0x003f8d910389 <JSFunction readPackageScope 
> (sfi = 0x3f8dbfc659)>, opt id 6, bytecode offset 13, deopt exit 27, FP to SP 
> delta 152, caller SP 0x003ffbdde868, pc 0x003f8e123648] reading input frame 
> readPackageScope => bytecode_offset=92, args=2, height=7, retval=0(#1); 
> inputs: 0: 0x003f8d910389 ; [fp - 16] 0x003f8d910389 <JSFunction 
> readPackageScope (sfi = 0x3f8dbfc659)> 1: 0x003f9c0c15a9 ; [fp + 16] 
> 0x003f9c0c15a9 <undefined> 2: 0x003f8df81161 ; [fp - 152] 0x003f8df81161 
> <String[99]: 
> u"/home/luyahan/testenode/web-ext/node_modules/@babel/plugin-transform-member-expression-literals/lib">
>  3: 0x003f8d901121 ; [fp - 32] 0x003f8d901121 <FunctionContext[129]> 4: 
> 0x000000000000 ; [fp - 40] 0 5: 0x006300000000 ; [fp - 48] 99 6: (optimized 
> out) 7: (optimized out) 8: (optimized out) 9: (optimized out) 10: (optimized 
> out) 11: (optimized out) reading input frame readPackage => 
> bytecode_offset=13, args=2, height=10, retval=0(#1); inputs: 0: 
> 0x003f8d9026c9 ; (literal 17) 0x003f8d9026c9 <JSFunction readPackage (sfi = 
> 0x3f8dbfc601)> 1: 0x003f9c0c15a9 ; (literal 18) 0x003f9c0c15a9 <undefined> 2: 
> 0x003f8df81121 ; [fp - 64] 0x003f8df81121 <String[100]: 
> uc"/home/luyahan/testenode/web-ext/node_modules/@babel/plugin-transform-member-expression-literals/lib/">
>  3: 0x003f8d901121 ; (literal 19) 0x003f8d901121 <FunctionContext[129]> 4: 
> (optimized out) 5: (optimized out) 6: (optimized out) 7: (optimized out) 8: 
> (optimized out) 9: (optimized out) 10: (optimized out) 11: (optimized out) 
> 12: (optimized out) 13: (optimized out) 14: (optimized out) translating 
> baseline frame readPackageScope => bytecode_offset=92, 
> variable_frame_size=56, frame_size=128 0x003ffbdde860: [top + 120] <- 
> 0x003f8df81161 <String[99]: 
> u"/home/luyahan/testenode/web-ext/node_modules/@babel/plugin-transform-member-expression-literals/lib">
>  ; stack parameter (input #2) 0x003ffbdde858: [top + 112] <- 0x003f9c0c15a9 
> <undefined> ; stack parameter (input #1) ------------------------- 
> 0x003ffbdde850: [top + 104] <- 0x003f8e0b7720 ; bottommost caller's pc 
> 0x003ffbdde848: [top + 96] <- 0x003ffbdde930 ; caller's fp 0x003ffbdde840: 
> [top + 88] <- 0x003f8d901121 <FunctionContext[129]> ; context (input #3) 
> 0x003ffbdde838: [top + 80] <- 0x003f8d910389 <JSFunction readPackageScope 
> (sfi = 0x3f8dbfc659)> ; function (input #0) 0x003ffbdde830: [top + 72] <- 
> 0x000000000002 ; actual argument count 0x003ffbdde828: [top + 64] <- 
> 0x003f8da30df1 <BytecodeArray[132]> ; bytecode array 0x003ffbdde820: [top + 
> 56] <- 0x009100000000 <Smi 145> ; bytecode offset ------------------------- 
> 0x003ffbdde818: [top + 48] <- 0x000000000000 <Smi 0> ; stack parameter (input 
> #4) 0x003ffbdde810: [top + 40] <- 0x006300000000 <Smi 99> ; stack parameter 
> (input #5) 0x003ffbdde808: [top + 32] <- 0x003f9c0c1df9 <Odd Oddball: 
> optimized_out> ; stack parameter (input #6) 0x003ffbdde800: [top + 24] <- 
> 0x003f9c0c1df9 <Odd Oddball: optimized_out> ; stack parameter (input #7)     
> 0x003ffbdde7f8: [top + 16] <- 0x003f9c0c1df9 <Odd Oddball: optimized_out> ; 
> stack parameter (input #8) 0x003ffbdde7f0: [top + 8] <- 0x003f9c0c1df9 <Odd 
> Oddball: optimized_out> ; stack parameter (input #9)     0x003ffbdde7e8: [top 
> + 0] <- 0x003f9c0c1df9 <Odd Oddball: optimized_out> ; stack parameter (input 
> #10) translating baseline frame readPackage => bytecode_offset=13, 
> variable_frame_size=88, frame_size=160 0x003ffbdde7e0: [top + 152] <- 
> 0x003f8df81121 <String[100]: 
> uc"/home/luyahan/testenode/web-ext/node_modules/@babel/plugin-transform-member-expression-literals/lib/">
>  ; stack parameter (input #2) 0x003ffbdde7d8: [top + 144] <- 0x003f9c0c15a9 
> <undefined> ; stack parameter (input #1) ------------------------- 
> 0x003ffbdde7d0: [top + 136] <- 0x0000011e06c0 ; caller's pc 0x003ffbdde7c8: 
> [top + 128] <- 0x003ffbdde848 ; caller's fp 0x003ffbdde7c0: [top + 120] <- 
> 0x003f8d901121 <FunctionContext[129]> ; context (input #3) 0x003ffbdde7b8: 
> [top + 112] <- 0x003f8d9026c9 <JSFunction readPackage (sfi = 0x3f8dbfc601)> ; 
> function (input #0) 0x003ffbdde7b0: [top + 104] <- 0x000000000002 ; actual 
> argument count 0x003ffbdde7a8: [top + 96] <- 0x003f8da310e9 
> <BytecodeArray[201]> ; bytecode array 0x003ffbdde7a0: [top + 88] <- 
> 0x004200000000 <Smi 66> ; bytecode offset ------------------------- 
> 0x003ffbdde798: [top + 80] <- 0x003f9c0c1df9 <Odd Oddball: optimized_out> ; 
> stack parameter (input #4)     0x003ffbdde790: [top + 72] <- 0x003f9c0c1df9 
> <Odd Oddball: optimized_out> ; stack parameter (input #5) 0x003ffbdde788: 
> [top + 64] <- 0x003f9c0c1df9 <Odd Oddball: optimized_out> ; stack parameter 
> (input #6)     0x003ffbdde780: [top + 56] <- 0x003f9c0c1df9 <Odd Oddball: 
> optimized_out> ; stack parameter (input #7) 0x003ffbdde778: [top + 48] <- 
> 0x003f9c0c1df9 <Odd Oddball: optimized_out> ; stack parameter (input #8)     
> 0x003ffbdde770: [top + 40] <- 0x003f9c0c1df9 <Odd Oddball: optimized_out> ; 
> stack parameter (input #9) 0x003ffbdde768: [top + 32] <- 0x003f9c0c1df9 <Odd 
> Oddball: optimized_out> ; stack parameter (input #10) 0x003ffbdde760: [top + 
> 24] <- 0x003f9c0c1df9 <Odd Oddball: optimized_out> ; stack parameter (input 
> #11) 0x003ffbdde758: [top + 16] <- 0x003f9c0c1df9 <Odd Oddball: 
> optimized_out> ; stack parameter (input #12) 0x003ffbdde750: [top + 8] <- 
> 0x003f9c0c1df9 <Odd Oddball: optimized_out> ; stack parameter (input #13) 
> 0x003ffbdde748: [top + 0] <- 0x0000699df449 ; return value 0 [bailout end. 
> took 10.776 ms]
> 
> cimpare arm64:
> all arm64 log
> [completed optimizing 0x1e1cd02c13f1 <JSFunction nextPart (sfi = 
> 0x281794044c89)> (target TURBOFAN)] [marking dependent code 0x7faec80e48e1 
> (0x0e004765c991 <SharedFunctionInfo readPackageScope>) (opt id 6) for 
> deoptimization, reason: code dependencies] [marking dependent code 
> 0x7faec80a5801 (0x0e004765d621 <SharedFunctionInfo Module._nodeModulePaths>) 
> (opt id 1) for deoptimization, reason: code dependencies] [deoptimize marked 
> code in all contexts] [marking 0x17de35e029a9 <JSFunction nativeModuleRequire 
> (sfi = 0x30620193e349)> for optimization to TURBOFAN, 
> ConcurrencyMode::kConcurrent, reason: small function] [marking 0x3bfb81011fc1 
> <JSFunction stat (sfi = 0xe004765c729)> for optimization to TURBOFAN, 
> ConcurrencyMode::kConcurrent, reason: hot and stable] [compiling method 
> 0x3bfb81011fc1 <JSFunction stat (sfi = 0xe004765c729)> (target TURBOFAN), 
> mode: ConcurrencyMode::kConcurrent] [compiling method 0x17de35e029a9 
> <JSFunction nativeModuleRequire (sfi = 0x30620193e349)> (target TURBOFAN), 
> mode: ConcurrencyMode::kConcurrent] [optimizing 0x3bfb81011fc1 <JSFunction 
> stat (sfi = 0xe004765c729)> (target TURBOFAN) - took 0.051, 9.891, 0.185 ms] 
> [completed optimizing 0x3bfb81011fc1 <JSFunction stat (sfi = 0xe004765c729)> 
> (target TURBOFAN)] [optimizing 0x17de35e029a9 <JSFunction nativeModuleRequire 
> (sfi = 0x30620193e349)> (target TURBOFAN) - took 0.050, 26.272, 0.181 ms]
> 
> -- 
> -- 
> v8-dev mailing list
> v8-dev@googlegroups.com
> http://groups.google.com/group/v8-dev
> --- 
> You received this message because you are subscribed to the Google Groups 
> "v8-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to v8-dev+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/v8-dev/83584948-0447-4e86-9380-28cd5118182en%40googlegroups.com.
> 
> -- 
> -- 
> v8-dev mailing list
> v8-dev@googlegroups.com
> http://groups.google.com/group/v8-dev
> --- 
> You received this message because you are subscribed to a topic in the Google 
> Groups "v8-dev" group.
> To unsubscribe from this topic, visit 
> https://groups.google.com/d/topic/v8-dev/OzIU8XFFt3o/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to 
> v8-dev+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/v8-dev/CAGRskv9_%2B4CN-Vs6MC2o11rzZ3kzFF-T60LSi8KPUYeJG4gArA%40mail.gmail.com.

-- 
-- 
v8-dev mailing list
v8-dev@googlegroups.com
http://groups.google.com/group/v8-dev
--- 
You received this message because you are subscribed to the Google Groups 
"v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to v8-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/v8-dev/6CD605AE-7080-4F39-A824-F28E631EBB69%40iscas.ac.cn.

Reply via email to