找到未经V8优化的相应JS源代码 [英] locate corresponding JS source of code which is not optimized by V8

查看:70
本文介绍了找到未经V8优化的相应JS源代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试优化node.js应用程序的性能,因此我正在分析V8的JIT编译器的行为。

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

通过<$ c运行应用程序时$ c> node --trace_deopt --trace_opt --code_comments --print_optcode ... ,输出包含许多重复行,如下所示:

When running the application via node --trace_deopt --trace_opt --code_comments --print_optcode ..., the output contains many recurring lines like the following:

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

如何找出哪个javascript代码对应 0x490a8b4aa69

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

此处提供完整输出。

推荐答案

该错误消息曾经在 v8 / src / objects.cc 的第10200行附近,但已不复存在。它基本上意味着当前没有对特定迹线采用优化。可能是因为它未被使用,或者很少使用。它可能是Node.js库函数。提供的地址在内存中。您必须将调试器附加到v8并在该位置加载 SharedFunctionInfo 的符号。也可能是产生消息的行上的断点。

That error message used to be around line 10200 of v8/src/objects.cc, but is no more. It basically means no optimization was currently employed for a particular trace. Possibly because it was unused, or used sufficiently infrequently. It may have likely been a Node.js library function. The address provided is in memory. You'd have to have attached a debugger to v8 and load the symbol for the SharedFunctionInfo at that location. Possibly breakpoint on the line that produces the message too.

我不认为知道什么没有优化是有用的,因为有很多东西都没有没有得到优化......只需从 - trace_opt 获取输出,并假设其他一切都没有。这只是一个暗示,检查是为优化的代码执行的,没有一个是时候了。也许尝试 - trace_codegen 并向后工作。

I don't think it is that useful to know what was not optimized, as there are lots of things that don't get optimized... just take the output from --trace_opt and assume everything else isn't. It was kind of just a hint that a check was performed for optimized code, and none was there are the time. Maybe try --trace_codegen and work backwards.

这对于研究而言非常耗时。

Thorsten Lorenz the guy 询问此事。

This looks to be a very time consuming thing to research.
Thorsten Lorenz would be the guy to ask about this.

这篇关于找到未经V8优化的相应JS源代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆