简体   繁体   中英

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. However, when I just added console.log in js code, the profile showed increase of instruction counts on libdvm.so. I guess this result tells that Dalvik seems to listen to or get some log message from kernel, and do something. My guess is correct? "adb logcat" in terminal enables me to check messages from "console.log" in js code. Dalvik interacts with this message??

Thanks!

Dalvik does not read the logcat output. 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.

You would see an increase of activity in Java code if the Javascript logging implementation called back into Java for some reason.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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