Duncan Coutts pushed to branch wip/dcoutts/printf-warnings at Glasgow Haskell Compiler / GHC
Commits:
-
2cb7c0a9
by Duncan Coutts at 2026-09-03T11:51:35+01:00
3 changed files:
Changes:
| ... | ... | @@ -1157,8 +1157,9 @@ scheduleHandleHeapOverflow( Capability *cap, StgTSO *t ) |
| 1157 | 1157 | |
| 1158 | 1158 | #if defined(DEBUG)
|
| 1159 | 1159 | debugTrace(DEBUG_sched,
|
| 1160 | - "--<< thread %ld (%s) stopped: requesting a large block (size %ld)\n",
|
|
| 1161 | - (long)t->id, what_next_strs[t->what_next], blocks);
|
|
| 1160 | + "--<< thread %" FMT_StgThreadID " (%s) stopped: "
|
|
| 1161 | + "requesting a large block (size %" FMT_Word ")\n",
|
|
| 1162 | + t->id, what_next_strs[t->what_next], blocks);
|
|
| 1162 | 1163 | #endif
|
| 1163 | 1164 | |
| 1164 | 1165 | // don't do this if the nursery is (nearly) full, we'll GC first.
|
| ... | ... | @@ -140,7 +140,8 @@ pruneSparkQueue (bool nonmovingMarkFinished, Capability *cap) |
| 140 | 140 | pool->top &= pool->moduloSize;
|
| 141 | 141 | |
| 142 | 142 | debugTrace(DEBUG_sparks,
|
| 143 | - "markSparkQueue: current spark queue len=%ld; (hd=%ld; tl=%ld)",
|
|
| 143 | + "markSparkQueue: current spark queue len=%ld; "
|
|
| 144 | + "(hd=%" FMT_Int "; tl=%" FMT_Int ")",
|
|
| 144 | 145 | sparkPoolSize(pool), pool->bottom, pool->top);
|
| 145 | 146 | |
| 146 | 147 | ASSERT_WSDEQUE_INVARIANTS(pool);
|
| ... | ... | @@ -288,7 +289,7 @@ pruneSparkQueue (bool nonmovingMarkFinished, Capability *cap) |
| 288 | 289 | debugTrace(DEBUG_sparks, "pruned %d sparks", pruned_sparks);
|
| 289 | 290 | |
| 290 | 291 | debugTrace(DEBUG_sparks,
|
| 291 | - "new spark queue len=%ld; (hd=%ld; tl=%ld)",
|
|
| 292 | + "new spark queue len=%ld; (hd=%" FMT_Int "; tl=%" FMT_Int ")",
|
|
| 292 | 293 | sparkPoolSize(pool), pool->bottom, pool->top);
|
| 293 | 294 | |
| 294 | 295 | ASSERT_WSDEQUE_INVARIANTS(pool);
|
| ... | ... | @@ -322,7 +323,8 @@ traverseSparkQueue (evac_fn evac, void *user, Capability *cap) |
| 322 | 323 | }
|
| 323 | 324 | |
| 324 | 325 | debugTrace(DEBUG_sparks,
|
| 325 | - "traversed spark queue, len=%ld; (hd=%ld; tl=%ld)",
|
|
| 326 | + "traversed spark queue, len=%ld; "
|
|
| 327 | + "(hd=%" FMT_Int "; tl=%" FMT_Int ")",
|
|
| 326 | 328 | sparkPoolSize(pool), pool->bottom, pool->top);
|
| 327 | 329 | }
|
| 328 | 330 |
| ... | ... | @@ -512,10 +512,11 @@ 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 = %lu, timeout.sec = %lu, timeout.nsec = %lu) = %d",
|
|
| 515 | + "ppoll(nfds = %lu, timeout.sec = %lld, timeout.nsec = %lld)"
|
|
| 516 | + " = %d",
|
|
| 516 | 517 | (unsigned long) nfds,
|
| 517 | - timeout_ns == NULL ? -1 : timeout_ns->tv_sec,
|
|
| 518 | - timeout_ns == NULL ? 0 : timeout_ns->tv_nsec,
|
|
| 518 | + (long long) timeout_ns == NULL ? -1 : timeout_ns->tv_sec,
|
|
| 519 | + (long long) timeout_ns == NULL ? 0 : timeout_ns->tv_nsec,
|
|
| 519 | 520 | res);
|
| 520 | 521 | #else
|
| 521 | 522 | int res = poll(poll_table, nfds, timeout_ms);
|