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

Unified Diff: base/message_loop/message_pump_libevent.cc

Issue 2695593009: Use the location where FileDescriptorWatcher is created to track the libevent handlers (Closed)
Patch Set: fix mac. Created 3 years, 10 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 | « base/message_loop/message_pump_libevent.h ('k') | base/message_loop/message_pump_libevent_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/message_loop/message_pump_libevent.cc
diff --git a/base/message_loop/message_pump_libevent.cc b/base/message_loop/message_pump_libevent.cc
index bc7f14db99a838a22d28645f53733b40afa7baf2..48cb98a3308f1d082300eda819d14a131ac7b079 100644
--- a/base/message_loop/message_pump_libevent.cc
+++ b/base/message_loop/message_pump_libevent.cc
@@ -43,12 +43,13 @@
namespace base {
-MessagePumpLibevent::FileDescriptorWatcher::FileDescriptorWatcher()
+MessagePumpLibevent::FileDescriptorWatcher::FileDescriptorWatcher(
+ const tracked_objects::Location& from_here)
: event_(NULL),
pump_(NULL),
watcher_(NULL),
- was_destroyed_(NULL) {
-}
+ was_destroyed_(NULL),
+ created_from_location_(from_here) {}
MessagePumpLibevent::FileDescriptorWatcher::~FileDescriptorWatcher() {
if (event_) {
@@ -315,8 +316,11 @@ void MessagePumpLibevent::OnLibeventNotification(int fd,
FileDescriptorWatcher* controller =
static_cast<FileDescriptorWatcher*>(context);
DCHECK(controller);
- TRACE_EVENT1("toplevel", "MessagePumpLibevent::OnLibeventNotification",
- "fd", fd);
+ TRACE_EVENT2("toplevel", "MessagePumpLibevent::OnLibeventNotification",
+ "src_file", controller->created_from_location().file_name(),
+ "src_func", controller->created_from_location().function_name());
+ TRACE_HEAP_PROFILER_API_SCOPED_TASK_EXECUTION heap_profiler_scope(
+ controller->created_from_location().file_name());
MessagePumpLibevent* pump = controller->pump();
pump->processed_io_events_ = true;
« no previous file with comments | « base/message_loop/message_pump_libevent.h ('k') | base/message_loop/message_pump_libevent_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698