Duncan Coutts pushed to branch wip/dcoutts/printf-warnings at Glasgow Haskell Compiler / GHC

Commits:

18 changed files:

Changes:

  • rts/Capability.c
    ... ... @@ -1396,7 +1396,9 @@ bool checkSparkCountInvariant (void)
    1396 1396
         /* The invariant is
    
    1397 1397
          *   created = converted + remaining + gcd + fizzled
    
    1398 1398
          */
    
    1399
    -    debugTrace(DEBUG_sparks,"spark invariant: %ld == %ld + %ld + %ld + %ld "
    
    1399
    +    debugTrace(DEBUG_sparks,"spark invariant: %" FMT_Word " == "
    
    1400
    +                            "%" FMT_Word " + %" FMT_Word64 " + "
    
    1401
    +                            "%" FMT_Word " + %" FMT_Word " "
    
    1400 1402
                                 "(created == converted + remaining + gcd + fizzled)",
    
    1401 1403
                                 sparks.created, sparks.converted, remaining,
    
    1402 1404
                                 sparks.gcd, sparks.fizzled);
    

  • rts/IOManager.c
    ... ... @@ -848,7 +848,9 @@ static void insertIntoSleepingQueue(CapIOManager *iomgr, StgTSO *tso, LowResTime
    848 848
     /* CMM primop. Result is true on success, or false on allocation failure. */
    
    849 849
     bool syncDelay(CapIOManager *iomgr, StgTSO *tso, HsInt us_delay)
    
    850 850
     {
    
    851
    -    debugTrace(DEBUG_iomanager, "thread %ld waiting for %lld us", tso->id, us_delay);
    
    851
    +    debugTrace(DEBUG_iomanager, "thread %" FMT_StgThreadID
    
    852
    +                                " waiting for %" FMT_Word " us",
    
    853
    +                                tso->id, us_delay);
    
    852 854
         ASSERT(tso->why_blocked == NotBlocked);
    
    853 855
         switch (iomgr_type) {
    
    854 856
     #if defined(IOMGR_ENABLED_SELECT)
    

  • rts/Printer.c
    ... ... @@ -554,7 +554,7 @@ printSmallBitmap( StgPtr spBottom, StgPtr payload, StgWord bitmap,
    554 554
         uint32_t i;
    
    555 555
     
    
    556 556
         for(i = 0; i < size; i++, bitmap >>= 1 ) {
    
    557
    -        debugBelch("   stk[%ld] (%p) = ", (long)(spBottom-(payload+i)), payload+i);
    
    557
    +        debugBelch("   stk[%td] (%p) = ", spBottom-(payload+i), payload+i);
    
    558 558
             if ((bitmap & 1) == 0) {
    
    559 559
                 printPtr((P_)payload[i]);
    
    560 560
                 debugBelch(" -- ");
    
    ... ... @@ -577,7 +577,7 @@ printLargeBitmap( StgPtr spBottom, StgPtr payload, StgLargeBitmap* large_bitmap,
    577 577
             StgWord bitmap = large_bitmap->bitmap[bmp];
    
    578 578
             j = 0;
    
    579 579
             for(; i < size && j < BITS_IN(W_); j++, i++, bitmap >>= 1 ) {
    
    580
    -            debugBelch("   stk[%" FMT_Word "] (%p) = ", (W_)(spBottom-(payload+i)), payload+i);
    
    580
    +            debugBelch("   stk[%td] (%p) = ", spBottom-(payload+i), payload+i);
    
    581 581
                 if ((bitmap & 1) == 0) {
    
    582 582
                     printPtr((P_)payload[i]);
    
    583 583
                     debugBelch(" -- ");
    

  • rts/STM.c
    ... ... @@ -134,7 +134,8 @@ static int shake(void) {
    134 134
       StgTRecHeader *__t = (_t);                                                    \
    
    135 135
       StgTRecChunk *__c = __t -> current_chunk;                                     \
    
    136 136
       StgWord __limit = __c -> next_entry_idx;                                      \
    
    137
    -  TRACE("%p : FOR_EACH_ENTRY, current_chunk=%p limit=%ld", __t, __c, __limit);  \
    
    137
    +  TRACE("%p : FOR_EACH_ENTRY, current_chunk=%p limit=%" FMT_Word,               \
    
    138
    +              __t, __c, __limit);                                               \
    
    138 139
       while (__c != END_STM_CHUNK_LIST) {                                           \
    
    139 140
         StgWord __i;                                                                \
    
    140 141
         for (__i = 0; __i < __limit; __i ++) {                                      \
    

  • rts/StableName.c
    ... ... @@ -195,7 +195,7 @@ lookupStableName (StgPtr p)
    195 195
     
    
    196 196
       if (sn != 0) {
    
    197 197
         ASSERT(stable_name_table[sn].addr == p);
    
    198
    -    debugTrace(DEBUG_stable, "cached stable name %ld at %p",sn,p);
    
    198
    +    debugTrace(DEBUG_stable, "cached stable name %" FMT_Word " at %p", sn, p);
    
    199 199
         stableNameUnlock();
    
    200 200
         return sn;
    
    201 201
       }
    
    ... ... @@ -275,8 +275,8 @@ gcStableNameTable( void )
    275 275
                     p->sn_obj = isAlive(p->sn_obj);
    
    276 276
                     if (p->sn_obj == NULL) {
    
    277 277
                         // StableName object died
    
    278
    -                    debugTrace(DEBUG_stable, "GC'd StableName %ld (addr=%p)",
    
    279
    -                               (long)(p - stable_name_table), p->addr);
    
    278
    +                    debugTrace(DEBUG_stable, "GC'd StableName %td (addr=%p)",
    
    279
    +                               p - stable_name_table, p->addr);
    
    280 280
                         freeSnEntry(p);
    
    281 281
                     } else if (p->addr != NULL) {
    
    282 282
                         // sn_obj is alive, update pointee
    

  • rts/ThreadPaused.c
    ... ... @@ -315,8 +315,8 @@ threadPaused(Capability *cap, StgTSO *tso)
    315 315
                     || (bh_info == &stg_WHITEHOLE_info))
    
    316 316
                 {
    
    317 317
                     debugTrace(DEBUG_squeeze,
    
    318
    -                           "suspending duplicate work: %ld words of stack",
    
    319
    -                           (long)((StgPtr)frame - tso->stackobj->sp));
    
    318
    +                           "suspending duplicate work: %td words of stack",
    
    319
    +                           (StgPtr)frame - tso->stackobj->sp);
    
    320 320
     
    
    321 321
                     // If this closure is already an indirection, then
    
    322 322
                     // suspend the computation up to this point.
    

  • rts/Threads.c
    ... ... @@ -609,7 +609,7 @@ threadStackOverflow (Capability *cap, StgTSO *tso)
    609 609
     
    
    610 610
             debugTrace(DEBUG_gc,
    
    611 611
                        "threadStackOverflow of TSO %" FMT_StgThreadID " (%p): stack"
    
    612
    -                   " too large (now %ld; max is %ld)", tso->id, tso,
    
    612
    +                   " too large (now %ld; max is %u)", tso->id, tso,
    
    613 613
                        (long)tso->stackobj->stack_size, RtsFlags.GcFlags.maxStkSize);
    
    614 614
             IF_DEBUG(gc,
    
    615 615
                      /* If we're debugging, just print out the top of the stack */
    
    ... ... @@ -667,7 +667,7 @@ threadStackOverflow (Capability *cap, StgTSO *tso)
    667 667
         }
    
    668 668
     
    
    669 669
         debugTraceCap(DEBUG_sched, cap,
    
    670
    -                  "allocating new stack chunk of size %d bytes",
    
    670
    +                  "allocating new stack chunk of size %" FMT_Word " bytes",
    
    671 671
                       chunk_size * sizeof(W_));
    
    672 672
     
    
    673 673
         // Charge the current thread for allocating stack.  Stack usage is
    
    ... ... @@ -966,7 +966,8 @@ printThreadBlockage(StgTSO *tso)
    966 966
       switch (UntagWhyBlocked(ACQUIRE_LOAD(&tso->why_blocked))) {
    
    967 967
     #if defined(mingw32_HOST_OS)
    
    968 968
         case BlockedOnDoProc:
    
    969
    -    debugBelch("is blocked on proc (request: %" FMT_Word ")", tso->block_info.async_reqID);
    
    969
    +    debugBelch("is blocked on proc (request: %" FMT_Word ")",
    
    970
    +               tso->block_info.async_reqID);
    
    970 971
         break;
    
    971 972
     #endif
    
    972 973
     #if !defined(THREADED_RTS)
    

  • rts/Trace.h
    ... ... @@ -113,7 +113,7 @@ extern RUNTIME_TRACE_FLAG_CACHE RuntimeTraceFlagCache;
    113 113
     // -----------------------------------------------------------------------------
    
    114 114
     
    
    115 115
     #if defined(DEBUG)
    
    116
    -void traceBegin (const char *str, ...);
    
    116
    +void traceBegin (const char *str, ...) STG_PRINTF_ATTR(1, 2);
    
    117 117
     void traceEnd (void);
    
    118 118
     #endif
    
    119 119
     
    
    ... ... @@ -265,7 +265,8 @@ void traceSparkEvent_ (Capability *cap, EventTypeNum tag, StgWord info1);
    265 265
             traceCap_(cap, msg, ##__VA_ARGS__);     \
    
    266 266
         }
    
    267 267
     
    
    268
    -void traceCap_(Capability *cap, char *msg, ...);
    
    268
    +void traceCap_(Capability *cap, char *msg, ...)
    
    269
    +    STG_PRINTF_ATTR(2, 3);
    
    269 270
     
    
    270 271
     /*
    
    271 272
      * Emit a trace message
    
    ... ... @@ -275,7 +276,8 @@ void traceCap_(Capability *cap, char *msg, ...);
    275 276
             trace_(msg, ##__VA_ARGS__);             \
    
    276 277
         }
    
    277 278
     
    
    278
    -void trace_(char *msg, ...);
    
    279
    +void trace_(char *msg, ...)
    
    280
    +    STG_PRINTF_ATTR(1, 2);
    
    279 281
     
    
    280 282
     /*
    
    281 283
      * A message or event emitted by the program
    

  • rts/posix/Poll.c
    ... ... @@ -431,13 +431,13 @@ void pollCompletedTimeoutsOrIOPoll(CapIOManager *iomgr)
    431 431
             int res = ppoll(poll_table, nfds, &tv, NULL);
    
    432 432
     
    
    433 433
             debugTrace(DEBUG_iomanager,
    
    434
    -                   "ppoll(nfds = %d, timeout.sec = 0, timeout.nsec = 0) = %d",
    
    434
    +                   "ppoll(nfds = %lu, timeout.sec = 0, timeout.nsec = 0) = %d",
    
    435 435
                        nfds, res);
    
    436 436
     #else
    
    437 437
             int res = poll(poll_table, nfds, 0);
    
    438 438
     
    
    439 439
             debugTrace(DEBUG_iomanager,
    
    440
    -                   "poll(nfds = %d, timeout_ms = 0) = %d",
    
    440
    +                   "poll(nfds = %lu, timeout_ms = 0) = %d",
    
    441 441
                        nfds, res);
    
    442 442
     #endif
    
    443 443
             if (res == 0) {
    
    ... ... @@ -512,7 +512,7 @@ bool awaitCompletedTimeoutsOrIOPoll(CapIOManager *iomgr)
    512 512
             int res = ppoll(poll_table, nfds, timeout_ns, NULL);
    
    513 513
     
    
    514 514
             debugTrace(DEBUG_iomanager,
    
    515
    -                   "ppoll(nfds = %d, timeout.sec = %d, timeout.nsec = %d) = %d",
    
    515
    +                   "ppoll(nfds = %lu, timeout.sec = %lu, timeout.nsec = %lu) = %d",
    
    516 516
                        nfds, timeout_ns == NULL ? -1 : timeout_ns->tv_sec,
    
    517 517
                              timeout_ns == NULL ?  0 : timeout_ns->tv_nsec,
    
    518 518
                        res);
    
    ... ... @@ -520,7 +520,7 @@ bool awaitCompletedTimeoutsOrIOPoll(CapIOManager *iomgr)
    520 520
             int res = poll(poll_table, nfds, timeout_ms);
    
    521 521
     
    
    522 522
             debugTrace(DEBUG_iomanager,
    
    523
    -                   "poll(nfds = %d, timeout_ms = %d) = %d",
    
    523
    +                   "poll(nfds = %lu, timeout_ms = %d) = %d",
    
    524 524
                        nfds, timeout_ms, res);
    
    525 525
     #endif
    
    526 526
     
    

  • rts/posix/Timeout.c
    ... ... @@ -54,7 +54,8 @@ bool syncDelayTimeout(CapIOManager *iomgr, StgTSO *tso, HsInt us_delay)
    54 54
         insertTimeoutQueue(&iomgr->timeout_queue, timeout, target);
    
    55 55
     
    
    56 56
         debugTrace(DEBUG_iomanager,
    
    57
    -               "timer for delay of %lld usec installed at time %lld ns",
    
    57
    +               "timer for delay of %" FMT_Int " usec installed "
    
    58
    +               "at time %" FMT_Int64 " ns",
    
    58 59
                    us_delay, target);
    
    59 60
         return true;
    
    60 61
     }
    
    ... ... @@ -98,7 +99,8 @@ void processTimeoutCompletions(CapIOManager *iomgr, Time now)
    98 99
             if (now < waketime) {
    
    99 100
                 break;
    
    100 101
             }
    
    101
    -        debugTrace(DEBUG_iomanager,"timer expired at %lld ns", waketime);
    
    102
    +        debugTrace(DEBUG_iomanager, "timer expired at %" FMT_Int64 " ns",
    
    103
    +                                    waketime);
    
    102 104
             StgTimeout *timeout;
    
    103 105
             deleteMinTimeoutQueue(&iomgr->timeout_queue, &timeout);
    
    104 106
             notifyTimeoutCompletion(iomgr, timeout);
    

  • rts/sm/Compact.c
    ... ... @@ -1049,7 +1049,7 @@ compact(StgClosure *static_objects,
    1049 1049
         // 2. update forward ptrs
    
    1050 1050
         for (W_ g = 0; g < RtsFlags.GcFlags.generations; g++) {
    
    1051 1051
             generation *gen = &generations[g];
    
    1052
    -        debugTrace(DEBUG_gc, "update_fwd:  %d", g);
    
    1052
    +        debugTrace(DEBUG_gc, "update_fwd:  %" FMT_Word, g);
    
    1053 1053
     
    
    1054 1054
             update_fwd(gen->blocks);
    
    1055 1055
             for (W_ n = 0; n < getNumCapabilities(); n++) {
    
    ... ... @@ -1059,7 +1059,7 @@ compact(StgClosure *static_objects,
    1059 1059
             update_fwd_large(gen->scavenged_large_objects);
    
    1060 1060
             update_fwd_cnf(gen->live_compact_objects);
    
    1061 1061
             if (g == RtsFlags.GcFlags.generations-1 && gen->old_blocks != NULL) {
    
    1062
    -            debugTrace(DEBUG_gc, "update_fwd:  %d (compact)", g);
    
    1062
    +            debugTrace(DEBUG_gc, "update_fwd:  %" FMT_Word " (compact)", g);
    
    1063 1063
                 update_fwd_compact(gen->old_blocks);
    
    1064 1064
             }
    
    1065 1065
         }
    
    ... ... @@ -1069,7 +1069,8 @@ compact(StgClosure *static_objects,
    1069 1069
         if (gen->old_blocks != NULL) {
    
    1070 1070
             W_ blocks = update_bkwd_compact(gen);
    
    1071 1071
             debugTrace(DEBUG_gc,
    
    1072
    -                   "update_bkwd: %d (compact, old: %d blocks, now %d blocks)",
    
    1072
    +                   "update_bkwd: %d (compact, old: %" FMT_Word " blocks, "
    
    1073
    +                                              "now %" FMT_Word " blocks)",
    
    1073 1074
                        gen->no, gen->n_old_blocks, blocks);
    
    1074 1075
             gen->n_old_blocks = blocks;
    
    1075 1076
         }
    

  • rts/sm/GC.c
    ... ... @@ -694,7 +694,15 @@ GarbageCollect (struct GcConfig config,
    694 694
     
    
    695 695
     #if defined(DEBUG)
    
    696 696
             debugTrace(DEBUG_gc,
    
    697
    -                   "mut_list_size: %lu (%d vars, %d arrays, %d MVARs, %d TVARs, %d TVAR_WATCH_QUEUEs, %d TREC_CHUNKs, %d TREC_HEADERs, %d others)",
    
    697
    +                   "mut_list_size: %lu ("
    
    698
    +                   "%" FMT_Word " vars, "
    
    699
    +                   "%" FMT_Word " arrays, "
    
    700
    +                   "%" FMT_Word " MVARs, "
    
    701
    +                   "%" FMT_Word " TVARs, "
    
    702
    +                   "%" FMT_Word " TVAR_WATCH_QUEUEs, "
    
    703
    +                   "%" FMT_Word " TREC_CHUNKs, "
    
    704
    +                   "%" FMT_Word " TREC_HEADERs, "
    
    705
    +                   "%" FMT_Word " others)",
    
    698 706
                        (unsigned long)(mut_list_size * sizeof(W_)),
    
    699 707
                        mutlist_scav_stats.n_MUTVAR,
    
    700 708
                        mutlist_scav_stats.n_MUTARR,
    
    ... ... @@ -914,7 +922,7 @@ GarbageCollect (struct GcConfig config,
    914 922
     
    
    915 923
       // Free the mark stack.
    
    916 924
       if (mark_stack_top_bd != NULL) {
    
    917
    -      debugTrace(DEBUG_gc, "mark stack: %d blocks",
    
    925
    +      debugTrace(DEBUG_gc, "mark stack: %" FMT_Word " blocks",
    
    918 926
                      countBlocks(mark_stack_top_bd));
    
    919 927
           freeChain(mark_stack_top_bd);
    
    920 928
       }
    
    ... ... @@ -1018,7 +1026,9 @@ GarbageCollect (struct GcConfig config,
    1018 1026
           need_copied_live = BLOCK_ROUND_UP(need_copied_live) / BLOCK_SIZE_W;
    
    1019 1027
           need_uncopied_live = BLOCK_ROUND_UP(need_uncopied_live) / BLOCK_SIZE_W;
    
    1020 1028
     
    
    1021
    -      debugTrace(DEBUG_gc, "(before) copied_live: %d; uncopied_live: %d", need_copied_live, need_uncopied_live );
    
    1029
    +      debugTrace(DEBUG_gc, "(before) copied_live: %" FMT_Word "; "
    
    1030
    +                           "uncopied_live: %" FMT_Word,
    
    1031
    +                           need_copied_live, need_uncopied_live);
    
    1022 1032
     
    
    1023 1033
     
    
    1024 1034
           // minOldGenSize states that the size of the oldest generation must be at least
    
    ... ... @@ -1027,7 +1037,8 @@ GarbageCollect (struct GcConfig config,
    1027 1037
           if (RtsFlags.GcFlags.minOldGenSize >= need_copied_live + need_uncopied_live){
    
    1028 1038
             extra_needed = RtsFlags.GcFlags.minOldGenSize - (need_copied_live + need_uncopied_live);
    
    1029 1039
           }
    
    1030
    -      debugTrace(DEBUG_gc, "(minOldGen: %d; extra_needed: %d", RtsFlags.GcFlags.minOldGenSize, extra_needed);
    
    1040
    +      debugTrace(DEBUG_gc, "(minOldGen: %d; extra_needed: %" FMT_Word,
    
    1041
    +                           RtsFlags.GcFlags.minOldGenSize, extra_needed);
    
    1031 1042
     
    
    1032 1043
           // If oldest gen is uncopying in some manner (compact or non-moving) then
    
    1033 1044
           // add the extra requested by minOldGenSize to uncopying portion of memory.
    
    ... ... @@ -1041,7 +1052,9 @@ GarbageCollect (struct GcConfig config,
    1041 1052
     
    
    1042 1053
           ASSERT(need_uncopied_live + need_copied_live >= RtsFlags.GcFlags.minOldGenSize );
    
    1043 1054
     
    
    1044
    -      debugTrace(DEBUG_gc, "(after) copied_live: %d; uncopied_live: %d", need_copied_live, need_uncopied_live );
    
    1055
    +      debugTrace(DEBUG_gc, "(after) copied_live: %" FMT_Word "; "
    
    1056
    +                           "uncopied_live: %" FMT_Word,
    
    1057
    +                           need_copied_live, need_uncopied_live);
    
    1045 1058
     
    
    1046 1059
           need_prealloc = 0;
    
    1047 1060
           for (i = 0; i < n_nurseries; i++) {
    
    ... ... @@ -1098,7 +1111,7 @@ GarbageCollect (struct GcConfig config,
    1098 1111
           need = BLOCKS_TO_MBLOCKS(need);
    
    1099 1112
     
    
    1100 1113
           got = mblocks_allocated;
    
    1101
    -      debugTrace(DEBUG_gc,"Returning: %d %d", got, need);
    
    1114
    +      debugTrace(DEBUG_gc, "Returning: %" FMT_Word " %" FMT_Word, got, need);
    
    1102 1115
     
    
    1103 1116
           uint32_t returned = 0;
    
    1104 1117
           if (got > need) {
    
    ... ... @@ -1772,7 +1785,7 @@ prepare_collected_gen (generation *gen)
    1772 1785
                 gen->bitmap = bitmap_bdescr;
    
    1773 1786
                 bitmap = bitmap_bdescr->start;
    
    1774 1787
     
    
    1775
    -            debugTrace(DEBUG_gc, "bitmap_size: %d, bitmap: %p",
    
    1788
    +            debugTrace(DEBUG_gc, "bitmap_size: %" FMT_Word ", bitmap: %p",
    
    1776 1789
                            bitmap_size, bitmap);
    
    1777 1790
     
    
    1778 1791
                 // don't forget to fill it with zeros!
    
    ... ... @@ -2109,7 +2122,8 @@ resize_nursery (void)
    2109 2122
     
    
    2110 2123
                 adjusted_blocks = (RtsFlags.GcFlags.maxHeapSize - 2 * blocks);
    
    2111 2124
     
    
    2112
    -            debugTrace(DEBUG_gc, "near maximum heap size of 0x%x blocks, blocks = %d, adjusted to %ld",
    
    2125
    +            debugTrace(DEBUG_gc, "near maximum heap size of 0x%x blocks, "
    
    2126
    +                                 "blocks = %" FMT_Word ", adjusted to %ld",
    
    2113 2127
                            RtsFlags.GcFlags.maxHeapSize, blocks, adjusted_blocks);
    
    2114 2128
     
    
    2115 2129
                 pc_free = adjusted_blocks * 100 / RtsFlags.GcFlags.maxHeapSize;
    

  • rts/sm/GCUtils.c
    ... ... @@ -173,9 +173,10 @@ push_scanned_block (bdescr *bd, gen_workspace *ws)
    173 173
     void
    
    174 174
     push_todo_block(bdescr *bd, gen_workspace *ws)
    
    175 175
     {
    
    176
    -    debugTrace(DEBUG_gc, "push todo block %p (%ld words), step %d, todo_q: %ld",
    
    177
    -            bd->start, (unsigned long)(bd->free - bd->u.scan),
    
    178
    -            ws->gen->no, dequeElements(ws->todo_q));
    
    176
    +    debugTrace(DEBUG_gc, "push todo block %p (%ld words), step %d, "
    
    177
    +                         "todo_q: %" FMT_Int,
    
    178
    +               bd->start, (unsigned long)(bd->free - bd->u.scan),
    
    179
    +               ws->gen->no, dequeElements(ws->todo_q));
    
    179 180
     
    
    180 181
         ASSERT(bd->link == NULL);
    
    181 182
     
    

  • rts/sm/MBlock.c
    ... ... @@ -398,7 +398,8 @@ void releaseFreeMemory(void)
    398 398
         // Do nothing if USE_LARGE_ADDRESS_SPACE, we never want
    
    399 399
         // to release address space
    
    400 400
     
    
    401
    -    debugTrace(DEBUG_gc, "mblock_high_watermark: %p\n", mblock_high_watermark);
    
    401
    +    debugTrace(DEBUG_gc, "mblock_high_watermark: %p\n",
    
    402
    +                         (void*)mblock_high_watermark);
    
    402 403
     }
    
    403 404
     
    
    404 405
     #else // !USE_LARGE_ADDRESS_SPACE
    

  • rts/sm/NonMoving.c
    ... ... @@ -707,7 +707,7 @@ void nonmovingPruneFreeSegmentList(void)
    707 707
       oldest_gen->n_words  -= pruned_segments * NONMOVING_SEGMENT_SIZE;
    
    708 708
       nonmovingHeap.saved_free = NULL;
    
    709 709
       debugTrace(DEBUG_nonmoving_gc,
    
    710
    -            "Pruned %d free segments, leaving %d on the free segment list.",
    
    710
    +            "Pruned %zd free segments, leaving %zd on the free segment list.",
    
    711 711
                 pruned_segments, new_length);
    
    712 712
       traceNonmovingPrunedSegments(pruned_segments, new_length);
    
    713 713
       trace(TRACE_nonmoving_gc, "Finished pruning free segment list.");
    

  • rts/sm/NonMovingMark.c
    ... ... @@ -370,7 +370,8 @@ void nonmovingBeginFlush(Task *task)
    370 370
     bool nonmovingWaitForFlush(void)
    
    371 371
     {
    
    372 372
         ACQUIRE_LOCK(&upd_rem_set_lock);
    
    373
    -    debugTrace(DEBUG_nonmoving_gc, "Flush count %d", upd_rem_set_flush_count);
    
    373
    +    debugTrace(DEBUG_nonmoving_gc, "Flush count %" FMT_Word,
    
    374
    +                                   upd_rem_set_flush_count);
    
    374 375
         bool finished = upd_rem_set_flush_count == getNumCapabilities();
    
    375 376
         if (!finished) {
    
    376 377
             waitCondition(&upd_rem_set_flushed_cond, &upd_rem_set_lock);
    
    ... ... @@ -1872,7 +1873,8 @@ nonmovingMark (MarkBudget* budget, MarkQueue *queue)
    1872 1873
                     RELEASE_SM_LOCK;
    
    1873 1874
                 } else {
    
    1874 1875
                     // Nothing more to do
    
    1875
    -                debugTrace(DEBUG_nonmoving_gc, "Finished mark pass: %d", count);
    
    1876
    +                debugTrace(DEBUG_nonmoving_gc,
    
    1877
    +                           "Finished mark pass: %" FMT_Word64, count);
    
    1876 1878
                     traceConcMarkEnd(count);
    
    1877 1879
                     return;
    
    1878 1880
                 }
    

  • rts/sm/Storage.c
    ... ... @@ -874,7 +874,8 @@ resizeNurseriesEach (W_ blocks)
    874 874
     
    
    875 875
             node = capNoToNumaNode(i);
    
    876 876
             if (nursery_blocks < blocks) {
    
    877
    -            debugTrace(DEBUG_gc, "increasing size of nursery from %d to %d blocks",
    
    877
    +            debugTrace(DEBUG_gc, "increasing size of nursery from %" FMT_Word
    
    878
    +                                 " to %" FMT_Word " blocks",
    
    878 879
                            nursery_blocks, blocks);
    
    879 880
                 nursery->blocks = allocNursery(node, nursery->blocks,
    
    880 881
                                                blocks-nursery_blocks);
    
    ... ... @@ -883,7 +884,8 @@ resizeNurseriesEach (W_ blocks)
    883 884
             {
    
    884 885
                 bdescr *next_bd;
    
    885 886
     
    
    886
    -            debugTrace(DEBUG_gc, "decreasing size of nursery from %d to %d blocks",
    
    887
    +            debugTrace(DEBUG_gc, "decreasing size of nursery from %" FMT_Word
    
    888
    +                                 " to %" FMT_Word " blocks",
    
    887 889
                            nursery_blocks, blocks);
    
    888 890
     
    
    889 891
                 bd = nursery->blocks;
    
    ... ... @@ -898,7 +900,8 @@ resizeNurseriesEach (W_ blocks)
    898 900
                 // might have gone just under, by freeing a large block, so make
    
    899 901
                 // up the difference.
    
    900 902
                 if (nursery_blocks < blocks) {
    
    901
    -                debugTrace(DEBUG_gc, "reincreasing size of nursery from %d to %d blocks",
    
    903
    +                debugTrace(DEBUG_gc, "reincreasing size of nursery from"
    
    904
    +                                     " %" FMT_Word " to %" FMT_Word " blocks",
    
    902 905
                                  nursery_blocks, blocks);
    
    903 906
                     nursery->blocks = allocNursery(node, nursery->blocks,
    
    904 907
                                                    blocks-nursery_blocks);
    

  • rts/sm/Sweep.c
    ... ... @@ -74,7 +74,11 @@ sweep(generation *gen)
    74 74
     
    
    75 75
         gen->live_estimate = live;
    
    76 76
     
    
    77
    -    debugTrace(DEBUG_gc, "sweeping: %d blocks, %d were copied, %d freed (%d%%), %d are fragmented, live estimate: %ld%%",
    
    77
    +    debugTrace(DEBUG_gc, "sweeping: %" FMT_Word " blocks, "
    
    78
    +                                   "%" FMT_Word " were copied, "
    
    79
    +                                   "%" FMT_Word " freed (%" FMT_Word "%%), "
    
    80
    +                                   "%" FMT_Word " are fragmented, "
    
    81
    +                         "live estimate: %lu%%",
    
    78 82
               gen->n_old_blocks + freed,
    
    79 83
               gen->n_old_blocks - blocks + freed,
    
    80 84
               freed,