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:
@ -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.
|
||||
|
||||
Reference in New Issue
Block a user