I want to profile the startup of an app. The goal is to see where
things like layout and paint might block startup to see if we need
some new APIs to turn off these things while the app JS is generating
the starting view, related to this dev-platform thread[1].

How do people do that sort of profiling today?

It is my understanding raptor is not the tool for that, and the
profile.sh script should be used.

I did a build and can run profile.sh via the instructions on MDN[2]. I
can get captures from running processes, but since I want to profile
the startup of a webapp[3], using `start -p [name]` is not the way to
go, since the pid cannot be not known when the app is closed.

Using `./profile.sh start` with no other arguments restarts the
device, but goes to a black screen and is not operable. The MDN page
also indicates this mode of profile.sh is deprecated. The last lines
in the logcat when this happens:

I/ServiceManager(  190): service 'android.security.keystore' died
I/ServiceManager(  190): service 'SurfaceFlinger' died
I/ServiceManager(  190): service 'permission' died
I/ServiceManager(  190): service 'display.qservice' died
I/Gecko   ( 2712): [Child 2712] WARNING: pipe error (3): Connection
reset by peer: file
/home/jr/git/B2G/gecko/ipc/chromium/src/chrome/common/ipc_channel_posix.cc,
line 459
I/Gecko   ( 2712):
I/Gecko   ( 2712): ###!!! [Child][MessageChannel::SendAndWait] Error:
Channel error: cannot send/recv

I tried the WebIDE's profiling tool and clicking the reload button in
there, and I can gather some information that way, but I feel it is
not completely accurate for startup since the reload button also seems
to trigger the "install app" flow and the "app installed" popup. It
also appears like the app window is not completely destroyed and
started fresh each time.

James

[1] https://groups.google.com/forum/#!topic/mozilla.dev.platform/F3Mp6dZonMA
[2] 
https://developer.mozilla.org/en-US/docs/Mozilla/Performance/Profiling_with_the_Built-in_Profiler#Other_Ways_to_Profile_B2G
[3] https://github.com/jrburke/fxos-startup-test
_______________________________________________
dev-b2g mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-b2g

Reply via email to