From c25b8acfb2cbf2d6b723b768d6571bb3e20ab561 Mon Sep 17 00:00:00 2001
From: simonm <unknown>
Date: Tue, 25 Nov 1997 11:23:18 +0000
Subject: [PATCH] [project @ 1997-11-25 11:23:18 by simonm] Don't arbitrarily
 truncate function names.

Reasoning:
	* No information is lost - the output might be poorly
	  formatted if long cost centres are involved though.
	* If the user wants shorter cost centre names, explicit cost
	  centres can be inserted.
---
 ghc/runtime/profiling/CostCentre.lc | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/ghc/runtime/profiling/CostCentre.lc b/ghc/runtime/profiling/CostCentre.lc
index 2d084c2d3314..28a81a02a060 100644
--- a/ghc/runtime/profiling/CostCentre.lc
+++ b/ghc/runtime/profiling/CostCentre.lc
@@ -269,7 +269,7 @@ report_cc_profiling(final)
 
 	    for (cc = Registered_CC; cc != REGISTERED_END; cc = cc->registered) {
 		if (cc->time_ticks != 0 && ! cc_to_ignore(cc))
-		    fprintf(serial_file, "  %0.11s:%0.16s %3ld\n",
+		    fprintf(serial_file, "  %s:%s %3ld\n",
 			cc->module, cc->label, cc->time_ticks*100 / final_ticks);
 	    }
 #endif
@@ -288,10 +288,10 @@ report_cc_profiling(final)
 		if (cc->time_ticks != 0 && !cc_to_ignore(cc)) {
 #ifdef PAR                                          
 		  /* Print _percentages_ in the parallel world */
-		    fprintf(serial_file, "  %0.11s:%0.16s %3ld\n",
+		    fprintf(serial_file, "  %s:%s %3ld\n",
 		      cc->module, cc->label, cc->time_ticks * 100/TICK_FREQUENCY);
 #else
-		    fprintf(serial_file, "  %0.11s:%0.16s %3ld\n",
+		    fprintf(serial_file, "  %s:%s %3ld\n",
 		      cc->module, cc->label, cc->time_ticks);
 #endif
 		}
@@ -364,7 +364,7 @@ report_cc_profiling(final)
     fprintf(prof_file, "  (excludes profiling overheads)\n\n");
 
 
-    fprintf(prof_file, "%-16.16s %-11.11s", "COST CENTRE", "MODULE");
+    fprintf(prof_file, "%-16s %-11s", "COST CENTRE", "MODULE");
 
     do_groups = have_interesting_groups(Registered_CC);
     if (do_groups) fprintf(prof_file, " %-11.11s", "GROUP");
@@ -396,7 +396,7 @@ report_cc_profiling(final)
 			      || cc->thunk_count || cc->function_count || cc->pap_count
 #endif
 	   ))))) {
-	    fprintf(prof_file, "%-16.16s %-11.11s", cc->label, cc->module);
+	    fprintf(prof_file, "%-16s %-11s", cc->label, cc->module);
 	    if (do_groups) fprintf(prof_file, " %-11.11s",cc->group);
 
 	    fprintf(prof_file, "%8ld  %5.1f  %5.1f %8ld %5ld %5ld",
-- 
GitLab