Instrument memory usage in NetworkQualityEstimator net/nqe |
||||||
Issue descriptionThe general idea is to have a "size_t EstimateMemoryUsage() const" method for every non-trivial class in net/nqe. The member method should return the size of dynamically allocated memory in bytes (see more info in base/trace_event/memory_usage_estimator.h/cc) Then the memory usage can be hooked up in net/'s MemoryDumpProvider (see URLRequestContext::OnMemoryDump() or HttpNetworkSession::DumpMemoryStats()). An example to do this can be found crrev.com/2661333002 or b4199f82689fd146d52d8352f4d07bd79d6cfbd6.
,
Feb 2 2017
A side note: base::trace_event::EstimateMemoryUsage() support for std::deque and scoped_refptr<> will be added soon by dskiba@. Please also cc dskiba@, ssid@ and me on your CLs. Thanks a lot for the help, Tarun!
,
Feb 13 2017
,
Feb 14 2017
,
Feb 16 2017
,
Feb 16 2017
There have been some discussions on the MemoryDumpProvider approach. The conclusion is that MDP should go after major allocations and skip anything under 100KB to keep maintenance burden at a minimum. We see nqe/ allocates about ~30KB in traces, so I will close this issue as WontFix. Thanks Tarun. |
||||||
►
Sign in to add a comment |
||||||
Comment 1 by tbansal@chromium.org
, Feb 2 2017Owner: tbansal@chromium.org
Status: Assigned (was: Untriaged)