Add support for Location (RTC_FROM_HERE) to ProcessThread::RegisterModule.
This makes a few things a lot clearer when looking at perf trace data:
* What module instances (where they were created) are called
* On what thread
* How frequently
* For how long
ProcessThread will be replaced by TaskQueue moving forward and this is a step towards understanding the behavior of the affected code.
BUG=webrtc:7219
Review-Url: https://codereview.webrtc.org/2729053002
Cr-Commit-Position: refs/heads/master@{#16998}
diff --git a/webrtc/modules/utility/include/process_thread.h b/webrtc/modules/utility/include/process_thread.h
index 8524a51..2132ee4 100644
--- a/webrtc/modules/utility/include/process_thread.h
+++ b/webrtc/modules/utility/include/process_thread.h
@@ -25,6 +25,10 @@
}
#endif
+namespace rtc {
+class Location;
+}
+
namespace webrtc {
class Module;
@@ -61,7 +65,7 @@
// Adds a module that will start to receive callbacks on the worker thread.
// Can be called from any thread.
- virtual void RegisterModule(Module* module) = 0;
+ virtual void RegisterModule(Module* module, const rtc::Location& from) = 0;
// Removes a previously registered module.
// Can be called from any thread.