Skip to content

v0.0.1

tagged this 25 Apr 18:52
Summary:
Context: `ModuleIdManager` is introduced in SamplingProfiler to hold RuntimeModule alive with reference counting. With the new domain design, it is not necessary, holding strong references to Domain is enough. However, pushing a Domain into vector may cause memory allocation in signal handler causing potential deadlock/crash.
To solve this, two new methods `increaseDomainCount/decreaseDomainCount` are added to perform `domains_` storage management outside of signal handler.

To summarize, this diff does:
* Remove `ModuleIdManager` and directly use RuntimeModule pointers in stack frame.
* Introduce `increaseDomainCount/decreaseDomainCount` to manage `domains_` storage to avoid memory allocation in signal handler.
* Added a new testcase

Reviewed By: davedets

Differential Revision: D15002859

fbshipit-source-id: 39460898a5acaa36cca772019c38d6871507b30c
Assets 2