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

Unified Diff: webkit/glue/devtools/js/profiler_processor.js

Issue 118112: DevTools Profiler UI changes.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webkit/glue/devtools/js/devtools.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/devtools/js/profiler_processor.js
===================================================================
--- webkit/glue/devtools/js/profiler_processor.js (revision 17398)
+++ webkit/glue/devtools/js/profiler_processor.js (working copy)
@@ -21,16 +21,31 @@
/**
+ * RegExp that leaves only JS functions.
* @type {RegExp}
*/
devtools.profiler.JsProfile.JS_FUNC_RE = /^(LazyCompile|Function|Script):/;
+/**
+ * RegExp that filters out native code (ending with "native src.js:xxx").
+ * @type {RegExp}
+ */
+devtools.profiler.JsProfile.JS_NATIVE_FUNC_RE = /\ native\ \w+\.js:\d+$/;
/**
+ * RegExp that filters out native scripts.
+ * @type {RegExp}
+ */
+devtools.profiler.JsProfile.JS_NATIVE_SCRIPT_RE = /^Script:\ native/;
+
+
+/**
* @override
*/
devtools.profiler.JsProfile.prototype.skipThisFunction = function(name) {
- return !devtools.profiler.JsProfile.JS_FUNC_RE.test(name);
+ return !devtools.profiler.JsProfile.JS_FUNC_RE.test(name) ||
+ devtools.profiler.JsProfile.JS_NATIVE_FUNC_RE.test(name) ||
pfeldman 2009/06/02 11:30:24 Could you hide this behind the flag / option at le
mnaganov (inactive) 2009/06/02 11:44:43 Added a comment that you need to comment out these
+ devtools.profiler.JsProfile.JS_NATIVE_SCRIPT_RE.test(name);
};
@@ -43,7 +58,8 @@
*/
devtools.profiler.Processor = function(newProfileCallback) {
/**
- *
+ * Callback that adds a new profile to view.
+ * @type {function(devtools.profiler.ProfileView)}
*/
this.newProfileCallback_ = newProfileCallback;
@@ -98,6 +114,16 @@
/**
+ * Sets new profile callback.
+ * @param {function(devtools.profiler.ProfileView)} callback Callback function.
+ */
+devtools.profiler.Processor.prototype.setNewProfileCallback = function(
+ callback) {
+ this.newProfileCallback_ = callback;
+};
+
+
+/**
* Processes a portion of V8 profiler event log.
*
* @param {string} chunk A portion of log.
« no previous file with comments | « webkit/glue/devtools/js/devtools.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698