Allow heap profiling to be controlled from within a program
It would be useful to be able to control heap profiling from within a running program.
For example if you are running a server, you might want to request a heap profile at specific points if memory usage is getting quite high, but don't want to pay the regular heap census cost.
API:
-
heapProfStartTimer
- Start heap profiling -
heapProfStopTimer
- Stop heap profiling -
heapRequestCensus
- Perform a heap census on the next context switch, even if the profiling ticker is turned off
You can imagine more complicated control in the future such as modifying the profiling interval during execution (#1420)