summaryrefslogtreecommitdiff
path: root/deps/v8/tools/oprofile
diff options
context:
space:
mode:
authorRyan <ry@tinyclouds.org>2009-06-29 10:55:05 +0200
committerRyan <ry@tinyclouds.org>2009-06-29 10:55:05 +0200
commite763efdadf4bbd9c0155a4c7f782d271a2fd5814 (patch)
tree094824e55548cdeb2ce9b796cbf29aaa591bb69f /deps/v8/tools/oprofile
parente876d6629e8682f5d818141bc0710f6d82311373 (diff)
downloadnode-new-e763efdadf4bbd9c0155a4c7f782d271a2fd5814.tar.gz
Upgrade v8 to 1.2.10 and libev to 3.6
Diffstat (limited to 'deps/v8/tools/oprofile')
-rw-r--r--deps/v8/tools/oprofile/annotate7
-rw-r--r--deps/v8/tools/oprofile/common19
-rw-r--r--deps/v8/tools/oprofile/dump7
-rw-r--r--deps/v8/tools/oprofile/report7
-rw-r--r--deps/v8/tools/oprofile/reset7
-rw-r--r--deps/v8/tools/oprofile/run14
-rw-r--r--deps/v8/tools/oprofile/shutdown7
-rw-r--r--deps/v8/tools/oprofile/start7
8 files changed, 75 insertions, 0 deletions
diff --git a/deps/v8/tools/oprofile/annotate b/deps/v8/tools/oprofile/annotate
new file mode 100644
index 0000000000..a6a8545bd6
--- /dev/null
+++ b/deps/v8/tools/oprofile/annotate
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+# Source common stuff.
+. `cd $(dirname "$0");pwd`/common
+
+opannotate --assembly --session-dir="$OPROFILE_SESSION_DIR" "$shell_exec" "$@"
+
diff --git a/deps/v8/tools/oprofile/common b/deps/v8/tools/oprofile/common
new file mode 100644
index 0000000000..fd00207ab0
--- /dev/null
+++ b/deps/v8/tools/oprofile/common
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+# Determine the session directory to use for oprofile.
+[ "$OPROFILE_SESSION_DIR" ] || OPROFILE_SESSION_DIR=/tmp/oprofv8
+
+# If no executable passed as the first parameter assume V8 release mode shell.
+if [[ -x $1 ]]
+then
+ shell_exec=`readlink -f "$1"`
+ # Any additional parameters are for the oprofile command.
+ shift
+else
+ oprofile_tools_path=`cd $(dirname "$0");pwd`
+ [ "$V8_SHELL_DIR" ] || V8_SHELL_DIR=$oprofile_tools_path/../..
+ shell_exec=$V8_SHELL_DIR/shell
+fi
+
+alias sudo_opcontrol='sudo opcontrol --session-dir="$OPROFILE_SESSION_DIR"'
+
diff --git a/deps/v8/tools/oprofile/dump b/deps/v8/tools/oprofile/dump
new file mode 100644
index 0000000000..17bb0a1b08
--- /dev/null
+++ b/deps/v8/tools/oprofile/dump
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+# Source common stuff.
+. `cd $(dirname "$0");pwd`/common
+
+sudo_opcontrol --dump "@$"
+
diff --git a/deps/v8/tools/oprofile/report b/deps/v8/tools/oprofile/report
new file mode 100644
index 0000000000..b7f28b9c45
--- /dev/null
+++ b/deps/v8/tools/oprofile/report
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+# Source common stuff.
+. `cd $(dirname "$0");pwd`/common
+
+opreport --symbols --session-dir="$OPROFILE_SESSION_DIR" "$shell_exec" "$@"
+
diff --git a/deps/v8/tools/oprofile/reset b/deps/v8/tools/oprofile/reset
new file mode 100644
index 0000000000..edb707110f
--- /dev/null
+++ b/deps/v8/tools/oprofile/reset
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+# Source common stuff.
+. `cd $(dirname "$0");pwd`/common
+
+sudo_opcontrol --reset "$@"
+
diff --git a/deps/v8/tools/oprofile/run b/deps/v8/tools/oprofile/run
new file mode 100644
index 0000000000..0a92470a01
--- /dev/null
+++ b/deps/v8/tools/oprofile/run
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+# Source common stuff.
+. `cd $(dirname "$0");pwd`/common
+
+# Reset oprofile samples.
+sudo_opcontrol --reset
+
+# Run the executable to profile with the correct arguments.
+"$shell_exec" --oprofile "$@"
+
+# Flush oprofile data including the generated code into ELF binaries.
+sudo_opcontrol --dump
+
diff --git a/deps/v8/tools/oprofile/shutdown b/deps/v8/tools/oprofile/shutdown
new file mode 100644
index 0000000000..8ebb72f06b
--- /dev/null
+++ b/deps/v8/tools/oprofile/shutdown
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+# Source common stuff.
+. `cd $(dirname "$0");pwd`/common
+
+sudo_opcontrol --shutdown "$@"
+
diff --git a/deps/v8/tools/oprofile/start b/deps/v8/tools/oprofile/start
new file mode 100644
index 0000000000..059e4b84c1
--- /dev/null
+++ b/deps/v8/tools/oprofile/start
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+# Source common stuff.
+. `cd $(dirname "$0");pwd`/common
+
+sudo_opcontrol --start --no-vmlinux "$@"
+