From 22f5bde796240e9b53dc48367bfecbd0b66b0faf Mon Sep 17 00:00:00 2001 From: "mnaganov@chromium.org" Date: Wed, 22 Jul 2009 12:07:31 +0000 Subject: DevTools Profiler: hide code injected by DevTools. BUG=none TEST=none Review URL: http://codereview.chromium.org/155919 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21270 0039d316-1c4b-4281-b951-d872f2087c98 --- webkit/glue/devtools/js/profiler_processor.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/webkit/glue/devtools/js/profiler_processor.js b/webkit/glue/devtools/js/profiler_processor.js index f88185e..9f452b3 100644 --- a/webkit/glue/devtools/js/profiler_processor.js +++ b/webkit/glue/devtools/js/profiler_processor.js @@ -127,6 +127,14 @@ devtools.profiler.JsProfile.JS_NATIVE_FUNC_RE = /\ native\ \w+\.js:\d+$/; */ devtools.profiler.JsProfile.JS_NATIVE_SCRIPT_RE = /^Script:\ native/; +/** + * RegExp that filters out devtools functions. See inject.js and + * inject_dispatch.js. + * @type {RegExp} + */ +devtools.profiler.JsProfile.JS_DEVTOOLS_FUNC_RE = + /^\w+:\ devtools(\$\$|\.Injected)/; + /** * @override @@ -135,7 +143,8 @@ devtools.profiler.JsProfile.prototype.skipThisFunction = function(name) { return !devtools.profiler.JsProfile.JS_FUNC_RE.test(name) || // To profile V8's natives comment out two lines below and '||' above. devtools.profiler.JsProfile.JS_NATIVE_FUNC_RE.test(name) || - devtools.profiler.JsProfile.JS_NATIVE_SCRIPT_RE.test(name); + devtools.profiler.JsProfile.JS_NATIVE_SCRIPT_RE.test(name) || + devtools.profiler.JsProfile.JS_DEVTOOLS_FUNC_RE.test(name); }; -- cgit v1.1