summaryrefslogtreecommitdiff
path: root/rts/Stats.c
diff options
context:
space:
mode:
authorErik de Castro Lopo <erikd@mega-nerd.com>2016-05-02 06:37:14 +1000
committerErik de Castro Lopo <erikd@mega-nerd.com>2016-05-05 08:29:27 +1000
commitdb9de7eb3e91820024f673bfdb6fb8064cfed20d (patch)
tree5e1c3ef0b6dee7f40fedbc118ba36cfe6ffdd1ee /rts/Stats.c
parentad4392c142696d5092533480a82ed65322e9d413 (diff)
downloadhaskell-db9de7eb3e91820024f673bfdb6fb8064cfed20d.tar.gz
rts: Replace `nat` with `uint32_t`
The `nat` type was an alias for `unsigned int` with a comment saying it was at least 32 bits. We keep the typedef in case client code is using it but mark it as deprecated. Test Plan: Validated on Linux, OS X and Windows Reviewers: simonmar, austin, thomie, hvr, bgamari, hsyl20 Differential Revision: https://phabricator.haskell.org/D2166
Diffstat (limited to 'rts/Stats.c')
-rw-r--r--rts/Stats.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/rts/Stats.c b/rts/Stats.c
index 25074ea1d0..64a371a9d6 100644
--- a/rts/Stats.c
+++ b/rts/Stats.c
@@ -163,7 +163,7 @@ initStats0(void)
void
initStats1 (void)
{
- nat i;
+ uint32_t i;
if (RtsFlags.GcFlags.giveStats >= VERBOSE_GC_STATS) {
statsPrintf(" Alloc Copied Live GC GC TOT TOT Page Flts\n");
@@ -232,12 +232,12 @@ stat_startGCSync (gc_thread *gct)
Called at the beginning of each GC
-------------------------------------------------------------------------- */
-static nat rub_bell = 0;
+static uint32_t rub_bell = 0;
void
stat_startGC (Capability *cap, gc_thread *gct)
{
- nat bell = RtsFlags.GcFlags.ringBell;
+ uint32_t bell = RtsFlags.GcFlags.ringBell;
if (bell) {
if (bell > 1) {
@@ -272,8 +272,8 @@ stat_startGC (Capability *cap, gc_thread *gct)
void
stat_endGC (Capability *cap, gc_thread *gct,
- W_ live, W_ copied, W_ slop, nat gen,
- nat par_n_threads, W_ par_max_copied, W_ par_tot_copied)
+ W_ live, W_ copied, W_ slop, uint32_t gen,
+ uint32_t par_n_threads, W_ par_max_copied, W_ par_tot_copied)
{
W_ tot_alloc;
W_ alloc;
@@ -420,9 +420,9 @@ stat_startRP(void)
#ifdef PROFILING
void
stat_endRP(
- nat retainerGeneration,
+ uint32_t retainerGeneration,
#ifdef DEBUG_RETAINER
- nat maxCStackSize,
+ uint32_t maxCStackSize,
int maxStackSize,
#endif
double averageNumVisit)
@@ -540,7 +540,7 @@ stat_exit (void)
char temp[BIG_STRING_LEN];
Time tot_cpu;
Time tot_elapsed;
- nat i, g, total_collections = 0;
+ uint32_t i, g, total_collections = 0;
getProcessTimes( &tot_cpu, &tot_elapsed );
tot_elapsed -= start_init_elapsed;
@@ -643,7 +643,7 @@ stat_exit (void)
statsPrintf("\n");
{
- nat i;
+ uint32_t i;
SparkCounters sparks = { 0, 0, 0, 0, 0, 0};
for (i = 0; i < n_capabilities; i++) {
sparks.created += capabilities[i]->spark_stats.created;
@@ -713,7 +713,7 @@ stat_exit (void)
#if defined(THREADED_RTS) && defined(PROF_SPIN)
{
- nat g;
+ uint32_t g;
statsPrintf("gc_alloc_block_sync: %"FMT_Word64"\n", gc_alloc_block_sync.spin);
statsPrintf("whitehole_spin: %"FMT_Word64"\n", whitehole_spin);
@@ -785,7 +785,7 @@ stat_exit (void)
void
statDescribeGens(void)
{
- nat g, mut, lge, i;
+ uint32_t g, mut, lge, i;
W_ gen_slop;
W_ tot_live, tot_slop;
W_ gen_live, gen_blocks;
@@ -859,8 +859,8 @@ extern rtsBool getGCStatsEnabled( void )
extern void getGCStats( GCStats *s )
{
- nat total_collections = 0;
- nat g;
+ uint32_t total_collections = 0;
+ uint32_t g;
Time gc_cpu = 0;
Time gc_elapsed = 0;
Time current_elapsed = 0;
@@ -904,7 +904,7 @@ extern void getGCStats( GCStats *s )
// extern void getTaskStats( TaskStats **s ) {}
#if 0
extern void getSparkStats( SparkCounters *s ) {
- nat i;
+ uint32_t i;
s->created = 0;
s->dud = 0;
s->overflowed = 0;