Fix Windows build after Ticky changes
authorTamar Christina <tamar@zhox.com>
Sat, 21 May 2016 09:31:58 +0000 (11:31 +0200)
committerBen Gamari <ben@smart-cactus.org>
Wed, 31 Aug 2016 21:00:48 +0000 (17:00 -0400)
Summary:
Replace hardcoded ld with FMT_Int for
StgInt types.

Test Plan: ./validate

Reviewers: austin, bgamari, simonmar, erikd

Reviewed By: erikd

Subscribers: thomie, #ghc_windows_task_force

Differential Revision: https://phabricator.haskell.org/D2249

(cherry picked from commit ae7e9cb574801954c7769c210829b06193fa72ea)

rts/Ticky.c

index cb3651d..b854e9e 100644 (file)
@@ -135,19 +135,19 @@ PrintTickyInfo(void)
         PC(INTAVG(tot_returns_of_new,tot_returns)));
 
 
-  fprintf(tf, "\nRET_NEW:         %11ld: ", RET_NEW_ctr);
+  fprintf(tf, "\nRET_NEW:         %11" FMT_Int ": ", RET_NEW_ctr);
   for (i = 0; i < TICKY_BIN_COUNT; i++) {
     fprintf(tf, "%5.1f%%", PC(INTAVG(RET_NEW_hst[i], RET_NEW_ctr)));
   }
   fprintf(tf, "\n");
 
-  fprintf(tf, "RET_OLD:         %11ld: ", RET_OLD_ctr);
+  fprintf(tf, "RET_OLD:         %11" FMT_Int ": ", RET_OLD_ctr);
   for (i = 0; i < TICKY_BIN_COUNT; i++) {
     fprintf(tf, "%5.1f%%", PC(INTAVG(RET_OLD_hst[i], RET_OLD_ctr)));
   }
   fprintf(tf, "\n");
 
-  fprintf(tf, "RET_UNBOXED_TUP: %11ld: ", RET_UNBOXED_TUP_ctr);
+  fprintf(tf, "RET_UNBOXED_TUP: %11" FMT_Int ": ", RET_UNBOXED_TUP_ctr);
   for (i = 0; i < TICKY_BIN_COUNT; i++) {
     fprintf(tf, "%5.1f%%", PC(INTAVG(RET_UNBOXED_TUP_hst[i],
                            RET_UNBOXED_TUP_ctr)));
@@ -311,7 +311,7 @@ PrintTickyInfo(void)
   PR_CTR(RET_UNBOXED_TUP_ctr);
 
 #define PR_HST_BINS(hst) for (i = 0; i < TICKY_BIN_COUNT; i++) \
-  { fprintf(tf,"%11ld " #hst "_%lu\n", hst[i], i); }
+  { fprintf(tf,"%11" FMT_Int " " #hst "_%lu\n", hst[i], i); }
 
   PR_HST_BINS(RET_NEW_hst);
   PR_HST_BINS(RET_OLD_hst);