Author: [email protected]
Date: Thu Jan 29 12:14:32 2009
New Revision: 1186
Added:
wiki/V8Profiler.wiki
Log:
Created wiki page through web user interface.
Added: wiki/V8Profiler.wiki
==============================================================================
--- (empty file)
+++ wiki/V8Profiler.wiki Thu Jan 29 12:14:32 2009
@@ -0,0 +1,68 @@
+#summary One-sentence summary of this page.
+
+= Introduction =
+
+V8 has built-in sample based profiling. Profiling is turned off by
default, but can be enabled via the --prof command line option. The
sampler records leaf-node samples of both javascript and C stacks.
+
+= Build =
+V8 must be built with ENABLE_LOGGING_AND_PROFILING in order to be used.
This macro is defined by default.
+
+= Windows =
+Symbol resolution is done using a .MAP file, so the application must be
linked to generate a .map file (as opposed to a PDB file) for debugging
information.
+
+= Command Line =
+To start profiling, use the --prof option. When profiling, v8 generates a
v8.out file which contains profiling data.
+
+{{{
+ v8_shell --prof
+}}}
+
+= Process the Generated Output =
+
+Two python scripts exist for generating the profiling output:
+
+Windows:
+{{{
+webkit\Release>..\..\v8\tools\windows-tick-processor.py v8_shell.exe v8.log
+}}}
+
+Other platforms:
+{{{
+webkit\Release>..\..\v8\tools\tick-processor.py v8_shell v8.log
+}}}
+
+
+
+= Programmatic Control of Profiling =
+If you would like to control in your application when profile samples are
collected, you can do so.
+
+First you'll probably want to use the --noprof-auto command line switch
which prevents the profiler from automatically starting to record profile
ticks.
+
+Profile ticks will not be recorded until your application specifically
invokes these APIs:
+ * V8::ResumeProfiler() - start/resume collection of data
+ * V8::PauseProfiler() - pause collection of data
+
+= Example Output =
+
+{{{
+Statistical profiling result from v8.log, (2069 ticks, 1 unaccounted).
+
+ [Shared libraries]:
+ total nonlib name
+ 75.5% 0.0% C:\WINDOWS\system32\ntdll.dll
+ 0.1% 0.0% C:\WINDOWS\system32\kernel32.dll
+ 0.0% 0.0% C:\WINDOWS\system32\uxtheme.dll
+
+ [JavaScript]:
+ total nonlib name
+ 0.2% 0.8% LoadIC_Normal Builtin
+ 0.2% 0.8% C_Entry Code stub
+ 0.1% 0.6% ArgumentsAdaptorTrampoline Builtin
+ ...
+
+ [C++]:
+ total nonlib name
+ 1.4% 5.6% v8::internal::JSObject::LookupInDescriptor
+ 1.2% 5.0% __output_l
+ 0.6% 2.4% v8::internal::JSObject::SearchLookupCache
+}}}
\ No newline at end of file
--~--~---------~--~----~------------~-------~--~----~
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
-~----------~----~----~----~------~----~------~--~---