summaryrefslogtreecommitdiff
path: root/rts/CloneStack.h
diff options
context:
space:
mode:
authorSven Tennie <sven.tennie@gmail.com>2021-04-03 19:35:34 +0200
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-09-23 15:59:38 -0400
commit29717ecb0711cd03796510fbe9b4bff58c7da870 (patch)
tree850a449ef01caeedf8fd8e9156e7eedcd5a028ce /rts/CloneStack.h
parent6f7f59901c047882ba8c9ae8812264f86b12483a (diff)
downloadhaskell-29717ecb0711cd03796510fbe9b4bff58c7da870.tar.gz
Use Info Table Provenances to decode cloned stack (#18163)
Emit an Info Table Provenance Entry (IPE) for every stack represeted info table if -finfo-table-map is turned on. To decode a cloned stack, lookupIPE() is used. It provides a mapping between info tables and their source location. Please see these notes for details: - [Stacktraces from Info Table Provenance Entries (IPE based stack unwinding)] - [Mapping Info Tables to Source Positions] Metric Increase: T12545
Diffstat (limited to 'rts/CloneStack.h')
-rw-r--r--rts/CloneStack.h15
1 files changed, 12 insertions, 3 deletions
diff --git a/rts/CloneStack.h b/rts/CloneStack.h
index 5f1c22039d..7e43d090d1 100644
--- a/rts/CloneStack.h
+++ b/rts/CloneStack.h
@@ -1,9 +1,10 @@
/* ---------------------------------------------------------------------------
*
- * (c) The GHC Team, 2001-2021
+ * (c) The GHC Team, 2020-2021
*
- * Stack snapshotting.
- */
+ * Stack snapshotting and decoding. (Cloning and unwinding.)
+ *
+ *---------------------------------------------------------------------------*/
#pragma once
@@ -14,10 +15,18 @@ StgStack* cloneStack(Capability* capability, const StgStack* stack);
void sendCloneStackMessage(StgTSO *tso, HsStablePtr mvar);
+StgMutArrPtrs* decodeClonedStack(Capability *cap, StgStack* stack);
+
#include "BeginPrivate.h"
#if defined(THREADED_RTS)
void handleCloneStackMessage(MessageCloneStack *msg);
#endif
+StgWord getStackFrameCount(StgStack* stack);
+StgWord getStackChunkClosureCount(StgStack* stack);
+void copyPtrsToArray(Capability *cap, StgMutArrPtrs* arr, StgStack* stack);
+StgClosure* createPtrClosure(Capability* cap, InfoProvEnt* ipe);
+StgMutArrPtrs* allocateMutableArray(StgWord size);
+
#include "EndPrivate.h"