diff options
author | mnaganov@chromium.org <mnaganov@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-08 05:01:00 +0000 |
---|---|---|
committer | mnaganov@chromium.org <mnaganov@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-08 05:01:00 +0000 |
commit | 30aaf483c173bf7dec1f46335a7d086aaf1c1ac5 (patch) | |
tree | 89960ea74329ac779c23d0611696045076da5598 /webkit/glue/devtools/debugger_agent_impl.cc | |
parent | 7916d1e915a6e20503c3bb2c034f1487203d85e3 (diff) | |
download | chromium_src-30aaf483c173bf7dec1f46335a7d086aaf1c1ac5.zip chromium_src-30aaf483c173bf7dec1f46335a7d086aaf1c1ac5.tar.gz chromium_src-30aaf483c173bf7dec1f46335a7d086aaf1c1ac5.tar.bz2 |
DevTools: make possible profiling of scripts doing heavy calculations.
Start / stop profiling commands are now sent using debugger protocol,
effectively breaking into script execution. Getting profiler log and
active modules is executed on IO thread.
BUG=28689
TEST=none
Review URL: http://codereview.chromium.org/460018
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34040 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/devtools/debugger_agent_impl.cc')
-rw-r--r-- | webkit/glue/devtools/debugger_agent_impl.cc | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/webkit/glue/devtools/debugger_agent_impl.cc b/webkit/glue/devtools/debugger_agent_impl.cc index a354cde..fa0775e 100644 --- a/webkit/glue/devtools/debugger_agent_impl.cc +++ b/webkit/glue/devtools/debugger_agent_impl.cc @@ -44,7 +44,6 @@ DebuggerAgentImpl::DebuggerAgentImpl( : web_view_impl_(web_view_impl), delegate_(delegate), webdevtools_agent_(webdevtools_agent), - profiler_log_position_(0), auto_continue_on_exception_(false) { DebuggerAgentManager::DebugAttach(this); } @@ -57,31 +56,6 @@ void DebuggerAgentImpl::GetContextId() { delegate_->SetContextId(webdevtools_agent_->host_id()); } -void DebuggerAgentImpl::StartProfiling(int flags) { - v8::HandleScope scope; - WebCore::Frame* frame = GetPage()->mainFrame(); - ASSERT(V8Proxy::retrieve(GetPage()->mainFrame())->isContextInitialized()); - v8::Context::Scope context_scope(V8Proxy::context(frame)); - v8::V8::ResumeProfilerEx(flags); -} - -void DebuggerAgentImpl::StopProfiling(int flags) { - v8::V8::PauseProfilerEx(flags); -} - -void DebuggerAgentImpl::GetActiveProfilerModules() { - delegate_->DidGetActiveProfilerModules(v8::V8::GetActiveProfilerModules()); -} - -void DebuggerAgentImpl::GetNextLogLines() { - static char buffer[65536]; - int read_size = v8::V8::GetLogLines( - profiler_log_position_, buffer, sizeof(buffer) - 1); - profiler_log_position_ += read_size; - buffer[read_size] = '\0'; - delegate_->DidGetNextLogLines(buffer); -} - void DebuggerAgentImpl::DebuggerOutput(const String& command) { delegate_->DebuggerOutput(command); webdevtools_agent_->ForceRepaint(); |