Push version 1.2.7 to trunk.
Improved debugger and profiler support.
Reduced compilation time by improving the handling of deferred code.
Optimized interceptor accesses where the property is on the object on which the interceptors is attached.
Fixed compilation problem on GCC 4.4 by changing the stack alignment to 16 bytes.
Fixed handle creation to follow stric aliasing rules.
Fixed compilation on FreeBSD.
Introduced API for forcing the deletion of a property ignoring interceptors and attributes.
git-svn-id: http://v8.googlecode.com/svn/trunk@2121 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
diff --git a/tools/gyp/v8.gyp b/tools/gyp/v8.gyp
index 7b9e3ac..66e1bb6 100644
--- a/tools/gyp/v8.gyp
+++ b/tools/gyp/v8.gyp
@@ -307,8 +307,6 @@
'cflags': [
# Avoid gcc 4.4 strict aliasing issues in dtoa.c
'-fno-strict-aliasing',
- # Avoid gcc 4.4 mksnapshot segfault.
- '-fno-tree-vectorize',
# Avoid crashes with gcc 4.4 in the v8 test suite.
'-fno-tree-vrp',
],
diff --git a/tools/linux-tick-processor b/tools/linux-tick-processor
index e2f38b1..968c241 100644
--- a/tools/linux-tick-processor
+++ b/tools/linux-tick-processor
@@ -1,16 +1,15 @@
#!/bin/sh
-tools_dir=$(dirname "$0")
-d8_exec=$tools_dir/../d8
+tools_path=`cd $(dirname "$0");pwd`
+[ "$D8_PATH" ] || D8_PATH=$tools_path/..
+d8_exec=$D8_PATH/d8
-# compile d8 if it doesn't exist.
-if [ ! -x $d8_exec ]
-then
- scons -C $tools_dir/.. d8
-fi
+# compile d8 if it doesn't exist, assuming this script
+# resides in the repository.
+[ -x $d8_exec ] || scons -j4 -C $D8_PATH -Y $tools_path/.. d8
# nm spits out 'no symbols found' messages to stderr.
-$d8_exec $tools_dir/splaytree.js $tools_dir/codemap.js \
- $tools_dir/csvparser.js $tools_dir/consarray.js \
- $tools_dir/profile.js $tools_dir/profile_view.js \
- $tools_dir/tickprocessor.js -- $@ 2>/dev/null
+$d8_exec $tools_path/splaytree.js $tools_path/codemap.js \
+ $tools_path/csvparser.js $tools_path/consarray.js \
+ $tools_path/profile.js $tools_path/profile_view.js \
+ $tools_path/tickprocessor.js -- $@ 2>/dev/null
diff --git a/tools/profile_view.js b/tools/profile_view.js
index 9d196a3..bdea631 100644
--- a/tools/profile_view.js
+++ b/tools/profile_view.js
@@ -53,6 +53,7 @@
callTree, opt_bottomUpViewWeights) {
var head;
var samplingRate = this.samplingRate;
+ var createViewNode = this.createViewNode;
callTree.traverse(function(node, viewParent) {
var totalWeight = node.totalWeight * samplingRate;
var selfWeight = node.selfWeight * samplingRate;
@@ -63,8 +64,7 @@
selfWeight = 0;
}
}
- var viewNode = new devtools.profiler.ProfileView.Node(
- node.label, totalWeight, selfWeight, head);
+ var viewNode = createViewNode(node.label, totalWeight, selfWeight, head);
if (viewParent) {
viewParent.addChild(viewNode);
} else {
@@ -72,26 +72,50 @@
}
return viewNode;
});
- var view = new devtools.profiler.ProfileView(head);
+ var view = this.createView(head);
return view;
};
/**
+ * Factory method for a profile view.
+ *
+ * @param {devtools.profiler.ProfileView.Node} head View head node.
+ * @return {devtools.profiler.ProfileView} Profile view.
+ */
+devtools.profiler.ViewBuilder.prototype.createView = function(head) {
+ return new devtools.profiler.ProfileView(head);
+};
+
+
+/**
+ * Factory method for a profile view node.
+ *
+ * @param {string} internalFuncName A fully qualified function name.
+ * @param {number} totalTime Amount of time that application spent in the
+ * corresponding function and its descendants (not that depending on
+ * profile they can be either callees or callers.)
+ * @param {number} selfTime Amount of time that application spent in the
+ * corresponding function only.
+ * @param {devtools.profiler.ProfileView.Node} head Profile view head.
+ * @return {devtools.profiler.ProfileView.Node} Profile view node.
+ */
+devtools.profiler.ViewBuilder.prototype.createViewNode = function(
+ funcName, totalTime, selfTime, head) {
+ return new devtools.profiler.ProfileView.Node(
+ funcName, totalTime, selfTime, head);
+};
+
+
+/**
* Creates a Profile View object. It allows to perform sorting
- * and filtering actions on the profile. Profile View mimicks
- * the Profile object from WebKit's JSC profiler.
+ * and filtering actions on the profile.
*
* @param {devtools.profiler.ProfileView.Node} head Head (root) node.
* @constructor
*/
devtools.profiler.ProfileView = function(head) {
this.head = head;
- this.title = '';
- this.uid = '';
- this.heavyProfile = null;
- this.treeProfile = null;
- this.flatProfile = null;
};
@@ -140,63 +164,12 @@
*/
devtools.profiler.ProfileView.Node = function(
internalFuncName, totalTime, selfTime, head) {
- this.callIdentifier = 0;
this.internalFuncName = internalFuncName;
- this.initFuncInfo();
this.totalTime = totalTime;
this.selfTime = selfTime;
this.head = head;
this.parent = null;
this.children = [];
- this.visible = true;
-};
-
-
-/**
- * RegEx for stripping V8's prefixes of compiled functions.
- */
-devtools.profiler.ProfileView.Node.FUNC_NAME_STRIP_RE =
- /^(?:LazyCompile|Function): (.*)$/;
-
-
-/**
- * RegEx for extracting script source URL and line number.
- */
-devtools.profiler.ProfileView.Node.FUNC_NAME_PARSE_RE = /^([^ ]+) (.*):(\d+)$/;
-
-
-/**
- * RegEx for removing protocol name from URL.
- */
-devtools.profiler.ProfileView.Node.URL_PARSE_RE = /^(?:http:\/)?.*\/([^/]+)$/;
-
-
-/**
- * Inits 'functionName', 'url', and 'lineNumber' fields using 'internalFuncName'
- * field.
- */
-devtools.profiler.ProfileView.Node.prototype.initFuncInfo = function() {
- var nodeAlias = devtools.profiler.ProfileView.Node;
- this.functionName = this.internalFuncName;
-
- var strippedName = nodeAlias.FUNC_NAME_STRIP_RE.exec(this.functionName);
- if (strippedName) {
- this.functionName = strippedName[1];
- }
-
- var parsedName = nodeAlias.FUNC_NAME_PARSE_RE.exec(this.functionName);
- if (parsedName) {
- this.url = parsedName[2];
- var parsedUrl = nodeAlias.URL_PARSE_RE.exec(this.url);
- if (parsedUrl) {
- this.url = parsedUrl[1];
- }
- this.functionName = parsedName[1];
- this.lineNumber = parsedName[3];
- } else {
- this.url = '';
- this.lineNumber = 0;
- }
};
diff --git a/tools/test.py b/tools/test.py
index 9981e8c..6bd536b 100755
--- a/tools/test.py
+++ b/tools/test.py
@@ -164,6 +164,8 @@
print "Command: %s" % EscapeCommand(failed.command)
if failed.HasCrashed():
print "--- CRASHED ---"
+ if failed.HasTimedOut():
+ print "--- TIMEOUT ---"
if len(self.failed) == 0:
print "==="
print "=== All tests succeeded"
@@ -207,6 +209,9 @@
if output.HasCrashed():
sys.stdout.write('C')
sys.stdout.flush()
+ elif output.HasTimedOut():
+ sys.stdout.write('T')
+ sys.stdout.flush()
else:
sys.stdout.write('F')
sys.stdout.flush()
@@ -245,6 +250,8 @@
print "Command: %s" % EscapeCommand(output.command)
if output.HasCrashed():
print "--- CRASHED ---"
+ if output.HasTimedOut():
+ print "--- TIMEOUT ---"
def Truncate(self, str, length):
if length and (len(str) > (length - 3)):
@@ -381,6 +388,9 @@
return self.output.exit_code < 0 and \
self.output.exit_code != -signal.SIGABRT
+ def HasTimedOut(self):
+ return self.output.timed_out;
+
def HasFailed(self):
execution_failed = self.test.DidFail(self.output)
if self.test.IsNegative():
diff --git a/tools/tickprocessor.js b/tools/tickprocessor.js
index 196daa9..477ab26 100644
--- a/tools/tickprocessor.js
+++ b/tools/tickprocessor.js
@@ -273,10 +273,6 @@
this.printCounter(this.ticks_.unaccounted, this.ticks_.total);
}
- // Disable initialization of 'funcName', 'url', 'lineNumber' as
- // we don't use it and it just wastes time.
- devtools.profiler.ProfileView.Node.prototype.initFuncInfo = function() {};
-
var flatProfile = this.profile_.getFlatProfile();
var flatView = this.viewBuilder_.buildView(flatProfile);
// Sort by self time, desc, then by name, desc.