Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(437)

Issue 125181: Added utility scripts for running oprofile (Closed)

Created:
11 years, 6 months ago by Søren Thygesen Gjesse
Modified:
9 years, 7 months ago
CC:
v8-dev
Visibility:
Public.

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. Committed: http://code.google.com/p/v8/source/detail?r=2186

Patch Set 1 #

Patch Set 2 : '' #

Patch Set 3 : '' #

Total comments: 2

Patch Set 4 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+79 lines, -0 lines) Patch
M src/oprofile-agent.cc View 1 2 3 1 chunk +4 lines, -0 lines 0 comments Download
A tools/oprofile/annotate View 1 1 chunk +7 lines, -0 lines 0 comments Download
A tools/oprofile/common View 1 2 3 1 chunk +19 lines, -0 lines 0 comments Download
A tools/oprofile/dump View 1 2 3 1 chunk +7 lines, -0 lines 0 comments Download
A tools/oprofile/report View 1 1 chunk +7 lines, -0 lines 0 comments Download
A tools/oprofile/reset View 1 2 3 1 chunk +7 lines, -0 lines 0 comments Download
A tools/oprofile/run View 1 2 3 1 chunk +14 lines, -0 lines 0 comments Download
A tools/oprofile/shutdown View 1 2 3 1 chunk +7 lines, -0 lines 0 comments Download
A tools/oprofile/start View 1 2 3 1 chunk +7 lines, -0 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
Søren Thygesen Gjesse
11 years, 6 months ago (2009-06-16 11:42:40 UTC) #1
Mikhail Naganov
LGTM with a suggestion. http://codereview.chromium.org/125181/diff/1011/25 File tools/oprofile/common (right): http://codereview.chromium.org/125181/diff/1011/25#newcode5 Line 5: Maybe add an alias ...
11 years, 6 months ago (2009-06-16 11:54:04 UTC) #2
Søren Thygesen Gjesse
11 years, 6 months ago (2009-06-16 12:08:15 UTC) #3
http://codereview.chromium.org/125181/diff/1011/25
File tools/oprofile/common (right):

http://codereview.chromium.org/125181/diff/1011/25#newcode5
Line 5: 
On 2009/06/16 11:54:04, Mikhail Naganov wrote:
> Maybe add an alias for 'sudo opcontrol --session-dir="$OPROFILE_SESSION_DIR"'
in
> this script?

Added alias sudo_opcontrol.

Powered by Google App Engine
This is Rietveld 408576698