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}
This commit is contained in:
tommi
2017-03-03 03:20:24 -08:00
committed by Commit bot
parent bcb72e786d
commit dea489f33e
17 changed files with 70 additions and 42 deletions

View File

@ -25,6 +25,10 @@ class QueuedTask;
}
#endif
namespace rtc {
class Location;
}
namespace webrtc {
class Module;
@ -61,7 +65,7 @@ class ProcessThread {
// 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.