Chromium android webview tracing

970 views
Skip to first unread message

StarDust

unread,
Mar 31, 2014, 8:09:37 AM3/31/14
to chromi...@chromium.org
I wanted to check out the Android webview shell and understand its code flow. 
For such activities, tracing seems to be the best option. 
I am not able to run the tracing command in Android Webview shell. 

I use the following command

ninja -C out/Debug android_webview_apk
build
/android/adb_install_apk.py --apk AndroidWebView.apk --apk_package org.chromium.android_webview.shell
adb_run_android_webview_shell http://www.google.com

build/android/adb_profile_chrome --browser android_webview_shell --time 5 --view

it returns error saying 
are you using the correct version 

can anyone help me with this ?

Primiano Tucci

unread,
Mar 31, 2014, 7:01:10 PM3/31/14
to zakoide...@gmail.com, Chromium-dev
Unfortunately using chromium-trace with the WebView shell is not supported yet.
If you want to grab a trace for WebView, the best option at the moment is using Android SysTrace.
The output and the modus operandi are very similar (though Chromium Trace has been enriched through the years to collect more data, for instance cc pictures, following IPC messages, etc).

Follow these instruction to use Android SysTrace:

IIRC its output is backwards compatible with Chromium Trace, so you can load the generated html file into chrome://tracing and use its new UI.

Primiano


--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev

StarDust

unread,
Apr 1, 2014, 8:44:18 AM4/1/14
to chromi...@chromium.org
Thank you . .
Can you specify me the options how you did it . .
I tried it,but my trace file is not displaying anything :(

StarDust

unread,
Apr 1, 2014, 9:01:19 AM4/1/14
to chromi...@chromium.org
Hi

I also wanted to know if the tracing works only for kitkat version.
As its not working with -a option

Primiano Tucci

unread,
Apr 1, 2014, 10:24:06 AM4/1/14
to Rohan Del, Chromium-dev
The way you get WebView related traces is as follows:
$ python systrace.py -t 5 -a me.android.browser webview
capturing trace... done
downloading trace... done

    wrote file:///src/android/klp-dev/external/chromium-trace/trace.html

And you'll get something like this



> I also wanted to know if the tracing works only for kitkat version.
To be honest I don't remember this, just try. However, remind that WebView in Android versions < KitKat was a different implementation which was not really related with chromium (it was a fork of WebKit).



--

Everyone is a mathematician

unread,
May 26, 2022, 7:39:56 PM5/26/22
to Chromium-dev, Primiano Tucci, Chromium-dev, StarDust
Reply all
Reply to author
Forward
0 new messages