Commit 5490e71b authored by pcapriotti's avatar pcapriotti
Browse files

Add getGCStatsEnabled function.

parent ee44e19f
...@@ -202,6 +202,7 @@ typedef struct _GCStats { ...@@ -202,6 +202,7 @@ typedef struct _GCStats {
StgDouble wall_seconds; StgDouble wall_seconds;
} GCStats; } GCStats;
void getGCStats (GCStats *s); void getGCStats (GCStats *s);
rtsBool getGCStatsEnabled (void);
// These don't change over execution, so do them elsewhere // These don't change over execution, so do them elsewhere
// StgDouble init_cpu_seconds; // StgDouble init_cpu_seconds;
......
...@@ -1072,6 +1072,7 @@ typedef struct _RtsSymbolVal { ...@@ -1072,6 +1072,7 @@ typedef struct _RtsSymbolVal {
SymI_HasProto(getOrSetSystemEventThreadEventManagerStore) \ SymI_HasProto(getOrSetSystemEventThreadEventManagerStore) \
SymI_HasProto(getOrSetSystemEventThreadIOManagerThreadStore) \ SymI_HasProto(getOrSetSystemEventThreadIOManagerThreadStore) \
SymI_HasProto(getGCStats) \ SymI_HasProto(getGCStats) \
SymI_HasProto(getGCStatsEnabled) \
SymI_HasProto(genSymZh) \ SymI_HasProto(genSymZh) \
SymI_HasProto(genericRaise) \ SymI_HasProto(genericRaise) \
SymI_HasProto(getProgArgv) \ SymI_HasProto(getProgArgv) \
......
...@@ -922,6 +922,11 @@ extern HsInt64 getAllocations( void ) ...@@ -922,6 +922,11 @@ extern HsInt64 getAllocations( void )
/* EZY: I'm not convinced I got all the casting right. */ /* EZY: I'm not convinced I got all the casting right. */
extern rtsBool getGCStatsEnabled( void )
{
return RtsFlags.GcFlags.giveStats != NO_GC_STATS;
}
extern void getGCStats( GCStats *s ) extern void getGCStats( GCStats *s )
{ {
nat total_collections = 0; nat total_collections = 0;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment