Fixes a bug in the profiler where call and apply would show up
authortimothy@apple.com <timothy@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 20 May 2008 13:57:41 +0000 (13:57 +0000)
committertimothy@apple.com <timothy@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 20 May 2008 13:57:41 +0000 (13:57 +0000)
commit3f825d81901cfb350b98ae90f7b8fa291c0a71de
tree05e024cbe501f12fe7306e3611976818b379a29c
parent0c179c75f5d54ce4da82154fe3d3bf1c7963795a
Fixes a bug in the profiler where call and apply would show up
and double the time spent in a function. We don't want to show call
and apply at all in the profiles. This change excludes them.

Reviewed by Kevin McCullough.

* profiler/ProfileNode.cpp:
(KJS::ProfileNode::stopProfiling): Remove a second for loop and
calculate self time in the existing loop.
* profiler/Profiler.cpp:
(KJS::shouldExcludeFunction): Helper inline function that returns
true in the current function in an InternalFunctionImp and it is
has the functionName call or apply.
(KJS::Profiler::willExecute): Call shouldExcludeFunction and return
early if if returns true.
(KJS::Profiler::didExecute): Ditto.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@33928 268f45cc-cd09-0410-ab3c-d52691b4dbfc
JavaScriptCore/ChangeLog
JavaScriptCore/profiler/ProfileNode.cpp
JavaScriptCore/profiler/Profiler.cpp