diff options
author | vadimt <vadimt@chromium.org> | 2015-01-16 17:28:06 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-01-17 01:29:55 +0000 |
commit | 3549b9a1e5b4698865c91458e6255231fdc4cba9 (patch) | |
tree | c7fda936c86234fa218b47449bc0a3e75467e2d4 /base | |
parent | 8ce46c7881a3296187c7dd27afb581f84f4b27a7 (diff) | |
download | chromium_src-3549b9a1e5b4698865c91458e6255231fdc4cba9.zip chromium_src-3549b9a1e5b4698865c91458e6255231fdc4cba9.tar.gz chromium_src-3549b9a1e5b4698865c91458e6255231fdc4cba9.tar.bz2 |
Instrumenting all wndprocs to find jank.
PeekMessage calls are still the top source of jank.
The theory is that they invoke some synchronous message processing, and this causes jank.
I realized that I didn't instrument all wndprocs, which I'm doing now.
BUG=440919
Review URL: https://codereview.chromium.org/850213002
Cr-Commit-Position: refs/heads/master@{#312004}
Diffstat (limited to 'base')
-rw-r--r-- | base/message_loop/message_pump_win.cc | 5 | ||||
-rw-r--r-- | base/power_monitor/power_monitor_device_source_win.cc | 6 | ||||
-rw-r--r-- | base/win/message_window.cc | 5 |
3 files changed, 16 insertions, 0 deletions
diff --git a/base/message_loop/message_pump_win.cc b/base/message_loop/message_pump_win.cc index c140691..a7a1485 100644 --- a/base/message_loop/message_pump_win.cc +++ b/base/message_loop/message_pump_win.cc @@ -162,6 +162,11 @@ void MessagePumpForUI::ScheduleDelayedWork(const TimeTicks& delayed_work_time) { // static LRESULT CALLBACK MessagePumpForUI::WndProcThunk( HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam) { + // TODO(vadimt): Remove ScopedTracker below once crbug.com/440919 is fixed. + tracked_objects::ScopedTracker tracking_profile( + FROM_HERE_WITH_EXPLICIT_FUNCTION( + "440919 MessagePumpForUI::WndProcThunk")); + switch (message) { case kMsgHaveWork: reinterpret_cast<MessagePumpForUI*>(wparam)->HandleWorkMessage(); diff --git a/base/power_monitor/power_monitor_device_source_win.cc b/base/power_monitor/power_monitor_device_source_win.cc index b8b16e1..0e199dc 100644 --- a/base/power_monitor/power_monitor_device_source_win.cc +++ b/base/power_monitor/power_monitor_device_source_win.cc @@ -5,6 +5,7 @@ #include "base/power_monitor/power_monitor.h" #include "base/power_monitor/power_monitor_device_source.h" #include "base/power_monitor/power_monitor_source.h" +#include "base/profiler/scoped_tracker.h" #include "base/win/wrapped_window_proc.h" namespace base { @@ -98,6 +99,11 @@ LRESULT CALLBACK PowerMonitorDeviceSource::PowerMessageWindow::WndProcThunk( UINT message, WPARAM wparam, LPARAM lparam) { + // TODO(vadimt): Remove ScopedTracker below once crbug.com/440919 is fixed. + tracked_objects::ScopedTracker tracking_profile( + FROM_HERE_WITH_EXPLICIT_FUNCTION( + "440919 PowerMonitorDeviceSource::PowerMessageWindow::WndProcThunk")); + switch (message) { case WM_POWERBROADCAST: ProcessWmPowerBroadcastMessage(wparam); diff --git a/base/win/message_window.cc b/base/win/message_window.cc index 57fe64c..0b4b29f 100644 --- a/base/win/message_window.cc +++ b/base/win/message_window.cc @@ -7,6 +7,7 @@ #include "base/lazy_instance.h" #include "base/logging.h" #include "base/process/memory.h" +#include "base/profiler/scoped_tracker.h" #include "base/win/wrapped_window_proc.h" const wchar_t kMessageWindowClassName[] = L"Chrome_MessageWindow"; @@ -120,6 +121,10 @@ LRESULT CALLBACK MessageWindow::WindowProc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam) { + // TODO(vadimt): Remove ScopedTracker below once crbug.com/440919 is fixed. + tracked_objects::ScopedTracker tracking_profile( + FROM_HERE_WITH_EXPLICIT_FUNCTION("440919 MessageWindow::WindowProc")); + MessageWindow* self = reinterpret_cast<MessageWindow*>( GetWindowLongPtr(hwnd, GWLP_USERDATA)); |