Reviewers: Michail Naganov,

Description:
Added utility scripts for running oprofile in tools/oprofile.

To profile running the JavaScript file test.js using the V8 release mode
shell (assuming it is build passing prof=oprofile to the SCons build).
The following commands can be used:

$ tools/oprofile/start
$ tools/oprofile/run test.js
$ tools/oprofile/report | less
$ tools/oprofile/annotate | less
$ tools/oprofile/shutdown

Here is a summary of the commands.

For all the commands taking an executable the executable is expected to
be a binary using V8. If no executable is specified the release mode V8
shell is assumed.

By default the --session-dir=/tmp/oprofv8 is passed to all oprofile
commands. This walue can be changed by setting environment variable
OPROFILE_SESSION_DIR.

When using the defaulf executable (V8 shell in release mode) it is
assumed to be located in ../.. relative from the oprofile utility
scripts. This default location can be overridden using the V8_SHELL_DIR
environment variable.

start
-----
Start the oprofiling daemon.

run [executable] [parameters]
-----------------------------
Profile a V8 executable. Running this will reset oprofile samples, run
the command and do an oprofile dump to flush samples and write ELF
binaries for the generated code. The parameters are passed to the
executable together with the --oprofile option.

report [executable] [parameters]
--------------------------------
Print the report for a profile run. The parameters are passed to
opreport. E.g report --callgraph.

annotate [executable] [parameters]
----------------------------------
Print annotated assembly for a profile run. The parameters are passed to
opannotate. E.g annotate -threshold 1.

reset
-----
Reset oprofile samples.

dump
----
Flush oprofile samples and write ELF binaries for the generated code.

shutdown
--------
Shutdown oprofile daemon.

Added a warning which is printed if option --oprofile is passed to a V8
which has not been compiled with oprofile support.

Please review this at http://codereview.chromium.org/125181

SVN Base: http://v8.googlecode.com/svn/branches/bleeding_edge/

Affected files:
   M     src/oprofile-agent.cc
   A     tools/oprofile/annotate
   A     tools/oprofile/common
   A     tools/oprofile/dump
   A     tools/oprofile/report
   A     tools/oprofile/reset
   A     tools/oprofile/run
   A     tools/oprofile/shutdown
   A     tools/oprofile/start



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

Reply via email to