From d89deeba47ce04a5198a71fa4cbc203fe2c90794 Mon Sep 17 00:00:00 2001 From: Matthew Pickering Date: Mon, 7 Dec 2020 13:19:28 +0000 Subject: Profiling: Allow heap profiling to be controlled dynamically. This patch exposes three new functions in `GHC.Profiling` which allow heap profiling to be enabled and disabled dynamically. 1. startHeapProfTimer - Starts heap profiling with the given RTS options 2. stopHeapProfTimer - Stops heap profiling 3. requestHeapCensus - Perform a heap census on the next context switch, regardless of whether the timer is enabled or not. --- rts/RtsSymbols.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'rts/RtsSymbols.c') diff --git a/rts/RtsSymbols.c b/rts/RtsSymbols.c index 7ea833ce55..989b878b56 100644 --- a/rts/RtsSymbols.c +++ b/rts/RtsSymbols.c @@ -984,6 +984,9 @@ SymI_HasProto(unlockFile) \ SymI_HasProto(startProfTimer) \ SymI_HasProto(stopProfTimer) \ + SymI_HasProto(startHeapProfTimer) \ + SymI_HasProto(stopHeapProfTimer) \ + SymI_HasProto(requestHeapCensus) \ SymI_HasProto(atomic_inc) \ SymI_HasProto(atomic_dec) \ SymI_HasProto(hs_spt_lookup) \ -- cgit v1.2.1