简体   繁体   English

Dalvik是否会收听日志/调试消息?

[英]Does Dalvik listen to log / debug message?

Javascript code in html seems to run on libwebcore.so when looking into trace profile if the js code computes only array elements without any graphics. 如果js代码只计算没有任何图形的数组元素,那么当查看跟踪配置文件时,html中的Javascript代码似乎在libwebcore.so上运行。 However, when I just added console.log in js code, the profile showed increase of instruction counts on libdvm.so. 但是,当我刚刚在js代码中添加console.log时,配置文件显示libdvm.so上的指令计数增加。 I guess this result tells that Dalvik seems to listen to or get some log message from kernel, and do something. 我想这个结果告诉Dalvik似乎从内核听取或得到一些日志消息,然后做点什么。 My guess is correct? 我的猜测是对的? "adb logcat" in terminal enables me to check messages from "console.log" in js code. 终端中的“adb logcat”使我能够在js代码中检查来自“console.log”的消息。 Dalvik interacts with this message?? 达尔维克与这条消息互动?

Thanks! 谢谢!

Dalvik does not read the logcat output. Dalvik不读取logcat输出。 The only interaction between the VM and the logs is if you enable stdio conversion ( setprop log.redirect-stdio true ) and then write to stdout or stderr, but I doubt this is what is happening here. VM和日志之间的唯一交互是,如果您启用stdio转换( setprop log.redirect-stdio true )然后写入stdout或stderr,但我怀疑这是发生在这里的事情。

You would see an increase of activity in Java code if the Javascript logging implementation called back into Java for some reason. 如果由于某种原因Javascript日志记录实现回调到Java,您会看到Java代码中的活动增加。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM