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

Unified Diff: mojo/public/cpp/bindings/connector.h

Issue 2623263005: Tag some of Mojo heap allocations for the heap profiler. (Closed)
Patch Set: Minor clean-up. Created 3 years, 11 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
Index: mojo/public/cpp/bindings/connector.h
diff --git a/mojo/public/cpp/bindings/connector.h b/mojo/public/cpp/bindings/connector.h
index dcfe8cb930464f41bbc326ffa2d3b2891005b7d4..80ffcd7a60bb2b178a756184b889758a9d2600ad 100644
--- a/mojo/public/cpp/bindings/connector.h
+++ b/mojo/public/cpp/bindings/connector.h
@@ -150,6 +150,8 @@ class MOJO_CPP_BINDINGS_EXPORT Connector
return task_runner_.get();
}
+ void SetWatcherHeapProfilerTag(const std::string& tag);
ssid 2017/01/12 21:52:54 const char* with a comment saying this must be a c
Jay Civelli 2017/01/13 01:09:27 Done.
+
private:
// Callback of mojo::Watcher.
void OnWatcherHandleReady(MojoResult result);
@@ -206,6 +208,9 @@ class MOJO_CPP_BINDINGS_EXPORT Connector
base::Lock connected_lock_;
bool connected_ = true;
+ // The tag to be used to track heap allocations performed by the watcher.
Ken Rockot(use gerrit already) 2017/01/12 21:05:22 nit: Not really allocations performed by the watch
Jay Civelli 2017/01/13 01:09:27 Clarified.
+ std::string heap_profiler_tag_;
ssid 2017/01/12 21:52:54 Oh this should be const char*. We do not store the
Jay Civelli 2017/01/13 01:09:27 Done.
+
// Create a single weak ptr and use it everywhere, to avoid the malloc/free
// cost of creating a new weak ptr whenever it is needed.
// NOTE: This weak pointer is invalidated when the message pipe is closed or

Powered by Google App Engine
This is Rietveld 408576698