Find an appropriate JS code source that is not optimized by V8

I am trying to optimize the performance of a node.js application and therefore I am analyzing the behavior of the V8 JIT compiler.

When starting the application through node --trace_deopt --trace_opt --code_comments --print_optcode ... output contains many duplicate lines, for example:

 [didn't find optimized code in optimized code map for 0x490a8b4aa69 <SharedFunctionInfo>] 

How to find out which javascript code corresponds to 0x490a8b4aa69 ?

Full exit is available here .

+5
source share
1 answer

This error message was around line 10200 v8/src/objects.cc , but no longer exists. This basically means that no optimization is currently used for a particular trace. Perhaps because it was not used or was rarely used. This was probably the library function of Node.js. The specified address is in memory. You will have to connect the debugger to v8 and load the symbol for SharedFunctionInfo in this place. Perhaps a breakpoint on the line that also creates the message.

I don’t think it’s useful to know that it has not been optimized, since there are many things that are not optimized ... just take the output from --trace_opt and assume that everything else is not. It was just a hint that the check was performed for optimized code, and no one had time. Perhaps try --trace_codegen and work backwards.

This seems like a very time consuming task to research.
Thorsten Lorenz will be the guy to ask about this.

+2
source

All Articles