Revision: 5477
Author: mikhail.naganov
Date: Thu Sep 16 05:29:36 2010
Log: Updated according to recent changes in V8 <-> DevTools profiles transport.
http://code.google.com/p/v8/source/detail?r=5477

Modified:
 /wiki/ProfilingChromiumWithV8.wiki

=======================================
--- /wiki/ProfilingChromiumWithV8.wiki  Fri Sep 18 04:24:24 2009
+++ /wiki/ProfilingChromiumWithV8.wiki  Thu Sep 16 05:29:36 2010
@@ -16,43 +16,31 @@
   * Developer Tools configure profilers for their own purposes;
* V8's logging code contains some optimizations to simplify logging state checks.

-== Recipe ingredients ==
-
-You need to pass several flags to Chromium in order to get the results you want. Let's discuss each flag in detail.
-
-  * *--no-sandbox* - turns off the renderer sandbox, obviously must have;
-  * *--js-flags* - this is the containers for flags passed to V8:
- * *--logfile=%t.log* - specifies a name pattern for log files; *%t* gets expanded into current time in milliseconds, so each process gets its own log file; you can use prefixes and suffixes if you want, like this: *prefix-%t-suffix.log*; - * *--noprof-lazy* - allows shared libraries entries to be logged upon CPU profiler initialization; - * *--prof-auto* / *--noprof-auto* - controls whether CPU profiling should start immediately after V8 initialization, or be controlled via Developer Tools Profiles pane; - * *--nocompress-log* - disables log contents compression which makes them unreadable for humans (but they still can be processed with V8's tick processor scripts); - * *--log-gc* - controls logging of heap contents on garbage collections (Heap profiling).
-
-== The cookbook ==
-
-Now having an understanding what behavior is controlled by which flag, let's combine them.
+== So, how to run Chromium to get a CPU profile? ==

Here is how to run Chromium in order to get a CPU profile from the start of the process:
 {{{
./Chromium --no-sandbox --js-flags="--logfile=%t.log --noprof-lazy --prof-auto"
 }}}

-If you want to start / stop CPU profiling manually using Developer Tools Profiles pane, use *--noprof-auto*:
-{{{
-./Chromium --no-sandbox --js-flags="--logfile=%t.log --noprof-lazy --noprof-auto"
-}}}
-
-To have heap usage statistics logged continuously, run Chromium like this:
+or
+
 {{{
-./Chromium --no-sandbox --js-flags="--logfile=%t.log --log-gc"
+./Chromium --no-sandbox --js-flags="--logfile=%t.log --noprof-lazy --prof-auto --nocompress-log"
 }}}

-To log heap usage statistics manually using Developer Tools Heap pane:
-{{{
-./Chromium --no-sandbox --js-flags="--logfile=%t.log"
-}}}
-
-Please note that when using manual controls for profiles creation, you wouldn't see profiles in Developer Tools, because all the data is being logged to a file, not to Developer Tools.
+if you want to be able to parse logs with your eyes.
+
+Please note that you wouldn't see profiles in Developer Tools, because all the data is being logged to a file, not to Developer Tools.
+
+=== Flags description ===
+
+  * *--no-sandbox* - turns off the renderer sandbox, obviously must have;
+  * *--js-flags* - this is the containers for flags passed to V8:
+ * *--logfile=%t.log* - specifies a name pattern for log files; *%t* gets expanded into current time in milliseconds, so each process gets its own log file; you can use prefixes and suffixes if you want, like this: *prefix-%t-suffix.log*; + * *--noprof-lazy* - allows shared libraries entries to be logged upon CPU profiler initialization; + * *--prof-auto* - tells that CPU profiling should start immediately after V8 initialization; + * *--nocompress-log* - disables log contents compression which makes them unreadable for humans (but they still can be processed with V8's tick processor scripts).

 == Notes ==

--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to