summaryrefslogtreecommitdiff
path: root/rts/Stats.c
diff options
context:
space:
mode:
authorBrian Brooks <brooks.brian@gmail.com>2014-07-10 02:55:33 -0500
committerAustin Seipp <austin@well-typed.com>2014-07-10 11:21:26 -0500
commit3c9fc104337a142fe4f375d30d7a6b81d55a70c1 (patch)
tree5db059908fa46e495e6bd1354ff51c0e3cc254b1 /rts/Stats.c
parent61cce9116ac1a927632979e56dfa9754c69d2441 (diff)
downloadhaskell-3c9fc104337a142fe4f375d30d7a6b81d55a70c1.tar.gz
Avoid unnecessary clock_gettime() syscalls in GC stats.
Summary: Avoid unnecessary clock_gettime() syscalls in GC stats. Test Plan: Use strace. Reviewers: simonmar, austin Reviewed By: simonmar, austin Subscribers: simonmar, relrod, carter Differential Revision: https://phabricator.haskell.org/D39
Diffstat (limited to 'rts/Stats.c')
-rw-r--r--rts/Stats.c45
1 files changed, 2 insertions, 43 deletions
diff --git a/rts/Stats.c b/rts/Stats.c
index 48c320c8f7..c3d963c845 100644
--- a/rts/Stats.c
+++ b/rts/Stats.c
@@ -173,8 +173,8 @@ initStats1 (void)
nat i;
if (RtsFlags.GcFlags.giveStats >= VERBOSE_GC_STATS) {
- statsPrintf(" Alloc Copied Live GC GC TOT TOT Page Flts\n");
- statsPrintf(" bytes bytes bytes user elap user elap\n");
+ statsPrintf(" Alloc Copied Live GC GC TOT TOT Page Flts\n");
+ statsPrintf(" bytes bytes bytes user elap user elap\n");
}
GC_coll_cpu =
(Time *)stgMallocBytes(
@@ -287,53 +287,12 @@ stat_startGC (Capability *cap, gc_thread *gct)
traceEventGcStartAtT(cap,
TimeToNS(gct->gc_start_elapsed - start_init_elapsed));
- gct->gc_start_thread_cpu = getThreadCPUTime();
-
if (RtsFlags.GcFlags.giveStats != NO_GC_STATS)
{
gct->gc_start_faults = getPageFaults();
}
}
-void
-stat_gcWorkerThreadStart (gc_thread *gct STG_UNUSED)
-{
-#if 0
- /*
- * We dont' collect per-thread GC stats any more, but this code
- * could be used to do that if we want to in the future:
- */
- if (RtsFlags.GcFlags.giveStats != NO_GC_STATS)
- {
- getProcessTimes(&gct->gc_start_cpu, &gct->gc_start_elapsed);
- gct->gc_start_thread_cpu = getThreadCPUTime();
- }
-#endif
-}
-
-void
-stat_gcWorkerThreadDone (gc_thread *gct STG_UNUSED)
-{
-#if 0
- /*
- * We dont' collect per-thread GC stats any more, but this code
- * could be used to do that if we want to in the future:
- */
- Time thread_cpu, elapsed, gc_cpu, gc_elapsed;
-
- if (RtsFlags.GcFlags.giveStats != NO_GC_STATS)
- {
- elapsed = getProcessElapsedTime();
- thread_cpu = getThreadCPUTime();
-
- gc_cpu = thread_cpu - gct->gc_start_thread_cpu;
- gc_elapsed = elapsed - gct->gc_start_elapsed;
-
- taskDoneGC(gct->cap->running_task, gc_cpu, gc_elapsed);
- }
-#endif
-}
-
/* -----------------------------------------------------------------------------
* Calculate the total allocated memory since the start of the
* program. Also emits events reporting the per-cap allocation