[commit: ghc] master: [skip ci] rts: Detabify Profiling.c (6aa6ca8)
git at git.haskell.org
git at git.haskell.org
Tue Oct 21 21:51:15 UTC 2014
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/6aa6ca89cf73a705ddd0cfccf8e89648e1edc6d5/ghc
>---------------------------------------------------------------
commit 6aa6ca89cf73a705ddd0cfccf8e89648e1edc6d5
Author: Austin Seipp <austin at well-typed.com>
Date: Tue Oct 21 16:33:46 2014 -0500
[skip ci] rts: Detabify Profiling.c
Signed-off-by: Austin Seipp <austin at well-typed.com>
>---------------------------------------------------------------
6aa6ca89cf73a705ddd0cfccf8e89648e1edc6d5
rts/Profiling.c | 72 ++++++++++++++++++++++++++++-----------------------------
1 file changed, 36 insertions(+), 36 deletions(-)
diff --git a/rts/Profiling.c b/rts/Profiling.c
index 53f64a7..a299189 100644
--- a/rts/Profiling.c
+++ b/rts/Profiling.c
@@ -49,7 +49,7 @@ static W_ total_prof_ticks;
static char *prof_filename; /* prof report file name = <program>.prof */
FILE *prof_file;
-static char *hp_filename; /* heap profile (hp2ps style) log file */
+static char *hp_filename; /* heap profile (hp2ps style) log file */
FILE *hp_file;
/* Linked lists to keep track of CCs and CCSs that haven't
@@ -95,8 +95,8 @@ CC_DECLARE(CC_DONT_CARE, "DONT_CARE", "MAIN", "<built-in>", CC_NOT_CAF, )
CC_DECLARE(CC_PINNED, "PINNED", "SYSTEM", "<built-in>", CC_NOT_CAF, );
CC_DECLARE(CC_IDLE, "IDLE", "IDLE", "<built-in>", CC_NOT_CAF, );
-CCS_DECLARE(CCS_MAIN, CC_MAIN, );
-CCS_DECLARE(CCS_SYSTEM, CC_SYSTEM, );
+CCS_DECLARE(CCS_MAIN, CC_MAIN, );
+CCS_DECLARE(CCS_SYSTEM, CC_SYSTEM, );
CCS_DECLARE(CCS_GC, CC_GC, );
CCS_DECLARE(CCS_OVERHEAD, CC_OVERHEAD, );
CCS_DECLARE(CCS_DONT_CARE, CC_DONT_CARE, );
@@ -129,7 +129,7 @@ static CostCentreStack * pruneCCSTree ( CostCentreStack *ccs );
static CostCentreStack * actualPush ( CostCentreStack *, CostCentre * );
static CostCentreStack * isInIndexTable ( IndexTable *, CostCentre * );
static IndexTable * addToIndexTable ( IndexTable *, CostCentreStack *,
- CostCentre *, unsigned int );
+ CostCentre *, unsigned int );
static void ccsSetSelected ( CostCentreStack *ccs );
static void initTimeProfiling ( void );
@@ -266,17 +266,17 @@ initProfilingLogFile(void)
}
if (RtsFlags.ProfFlags.doHeapProfile) {
- /* Initialise the log file name */
- hp_filename = arenaAlloc(prof_arena, strlen(prog) + 6);
- sprintf(hp_filename, "%s.hp", prog);
-
- /* open the log file */
- if ((hp_file = fopen(hp_filename, "w")) == NULL) {
- debugBelch("Can't open profiling report file %s\n",
- hp_filename);
- RtsFlags.ProfFlags.doHeapProfile = 0;
- return;
- }
+ /* Initialise the log file name */
+ hp_filename = arenaAlloc(prof_arena, strlen(prog) + 6);
+ sprintf(hp_filename, "%s.hp", prog);
+
+ /* open the log file */
+ if ((hp_file = fopen(hp_filename, "w")) == NULL) {
+ debugBelch("Can't open profiling report file %s\n",
+ hp_filename);
+ RtsFlags.ProfFlags.doHeapProfile = 0;
+ return;
+ }
}
}
@@ -413,26 +413,26 @@ ccsSetSelected (CostCentreStack *ccs)
if (RtsFlags.ProfFlags.modSelector) {
if (! strMatchesSelector (ccs->cc->module,
RtsFlags.ProfFlags.modSelector) ) {
- ccs->selected = 0;
+ ccs->selected = 0;
return;
}
}
if (RtsFlags.ProfFlags.ccSelector) {
if (! strMatchesSelector (ccs->cc->label,
RtsFlags.ProfFlags.ccSelector) ) {
- ccs->selected = 0;
+ ccs->selected = 0;
return;
}
}
if (RtsFlags.ProfFlags.ccsSelector) {
- CostCentreStack *c;
+ CostCentreStack *c;
for (c = ccs; c != NULL; c = c->prevStack)
{
if ( strMatchesSelector (c->cc->label,
RtsFlags.ProfFlags.ccsSelector) ) {
- break;
- }
- }
+ break;
+ }
+ }
if (c == NULL) {
ccs->selected = 0;
return;
@@ -454,9 +454,9 @@ pushCostCentre ( CostCentreStack *ccs, CostCentre *cc )
#define pushCostCentre _pushCostCentre
{
IF_DEBUG(prof,
- traceBegin("pushing %s on ", cc->label);
- debugCCS(ccs);
- traceEnd(););
+ traceBegin("pushing %s on ", cc->label);
+ debugCCS(ccs);
+ traceEnd(););
return pushCostCentre(ccs,cc);
}
@@ -670,13 +670,13 @@ ignoreCC (CostCentre *cc)
{
if (RtsFlags.CcFlags.doCostCentres < COST_CENTRES_ALL &&
( cc == CC_OVERHEAD
- || cc == CC_DONT_CARE
- || cc == CC_GC
+ || cc == CC_DONT_CARE
+ || cc == CC_GC
|| cc == CC_SYSTEM
|| cc == CC_IDLE)) {
- return rtsTrue;
+ return rtsTrue;
} else {
- return rtsFalse;
+ return rtsFalse;
}
}
@@ -691,7 +691,7 @@ ignoreCCS (CostCentreStack *ccs)
|| ccs == CCS_IDLE)) {
return rtsTrue;
} else {
- return rtsFalse;
+ return rtsFalse;
}
}
@@ -839,28 +839,28 @@ reportCCSProfiling( void )
if (RtsFlags.CcFlags.doCostCentres == 0) return;
fprintf(prof_file, "\t%s Time and Allocation Profiling Report (%s)\n",
- time_str(), "Final");
+ time_str(), "Final");
fprintf(prof_file, "\n\t ");
fprintf(prof_file, " %s", prog_name);
fprintf(prof_file, " +RTS");
for (count = 0; rts_argv[count]; count++)
- fprintf(prof_file, " %s", rts_argv[count]);
+ fprintf(prof_file, " %s", rts_argv[count]);
fprintf(prof_file, " -RTS");
for (count = 1; prog_argv[count]; count++)
- fprintf(prof_file, " %s", prog_argv[count]);
+ fprintf(prof_file, " %s", prog_argv[count]);
fprintf(prof_file, "\n\n");
fprintf(prof_file, "\ttotal time = %11.2f secs (%lu ticks @ %d us, %d processor%s)\n",
((double) total_prof_ticks *
(double) RtsFlags.MiscFlags.tickInterval) / (TIME_RESOLUTION * n_capabilities),
- (unsigned long) total_prof_ticks,
+ (unsigned long) total_prof_ticks,
(int) TimeToUS(RtsFlags.MiscFlags.tickInterval),
n_capabilities, n_capabilities > 1 ? "s" : "");
fprintf(prof_file, "\ttotal alloc = %11s bytes",
- showStgWord64(total_alloc * sizeof(W_),
- temp, rtsTrue/*commas*/));
+ showStgWord64(total_alloc * sizeof(W_),
+ temp, rtsTrue/*commas*/));
fprintf(prof_file, " (excludes profiling overheads)\n\n");
@@ -915,7 +915,7 @@ logCCS(CostCentreStack *ccs, nat indent, nat max_label_len, nat max_module_len)
total_alloc == 0 ? 0.0 : ((double)ccs->mem_alloc / (double)total_alloc * 100.0),
total_prof_ticks == 0 ? 0.0 : ((double)ccs->inherited_ticks / (double)total_prof_ticks * 100.0),
total_alloc == 0 ? 0.0 : ((double)ccs->inherited_alloc / (double)total_alloc * 100.0)
- );
+ );
if (RtsFlags.CcFlags.doCostCentres >= COST_CENTRES_VERBOSE) {
fprintf(prof_file, " %5" FMT_Word64 " %9" FMT_Word64,
More information about the ghc-commits
mailing list