summaryrefslogtreecommitdiff
path: root/rts/Hpc.c
diff options
context:
space:
mode:
authorAustin Seipp <austin@well-typed.com>2014-08-20 12:22:48 -0500
committerAustin Seipp <austin@well-typed.com>2014-08-20 12:22:48 -0500
commit93ec914b14db06b111f2fb7cd0e7a0eece214684 (patch)
treeb651a39477c5d4fe5cfcb949b4e8c2dd26405eb0 /rts/Hpc.c
parent870cca8382f8c69d66eff54fe16cd4445e83dda6 (diff)
downloadhaskell-93ec914b14db06b111f2fb7cd0e7a0eece214684.tar.gz
rts: detabify/dewhitespace Hpc.c
Signed-off-by: Austin Seipp <austin@well-typed.com>
Diffstat (limited to 'rts/Hpc.c')
-rw-r--r--rts/Hpc.c46
1 files changed, 23 insertions, 23 deletions
diff --git a/rts/Hpc.c b/rts/Hpc.c
index c4f43cd9d0..ca3386d324 100644
--- a/rts/Hpc.c
+++ b/rts/Hpc.c
@@ -1,6 +1,6 @@
/*
* (c)2006 Galois Connections, Inc.
- */
+ */
#include "PosixSource.h"
#include "Rts.h"
@@ -32,11 +32,11 @@
*
*/
-static int hpc_inited = 0; // Have you started this component?
-static pid_t hpc_pid = 0; // pid of this process at hpc-boot time.
- // Only this pid will read or write .tix file(s).
-static FILE *tixFile; // file being read/written
-static int tix_ch; // current char
+static int hpc_inited = 0; // Have you started this component?
+static pid_t hpc_pid = 0; // pid of this process at hpc-boot time.
+ // Only this pid will read or write .tix file(s).
+static FILE *tixFile; // file being read/written
+static int tix_ch; // current char
static HashTable * moduleHash = NULL; // module name -> HpcModuleInfo
@@ -115,7 +115,7 @@ readTix(void) {
ws();
expect('[');
ws();
-
+
while(tix_ch != ']') {
tmpModule = (HpcModuleInfo *)stgMallocBytes(sizeof(HpcModuleInfo),
"Hpc.readTix");
@@ -143,13 +143,13 @@ readTix(void) {
tmpModule->tixArr[i] = expectWord64();
ws();
if (tix_ch == ',') {
- expect(',');
- ws();
+ expect(',');
+ ws();
}
}
expect(']');
ws();
-
+
lookup = lookupHashTable(moduleHash, (StgWord)tmpModule->modName);
if (lookup == NULL) {
debugTrace(DEBUG_hpc,"readTix: new HpcModuleInfo for %s",
@@ -252,8 +252,8 @@ startupHpc(void)
void
hs_hpc_module(char *modName,
- StgWord32 modCount,
- StgWord32 modHashNo,
+ StgWord32 modCount,
+ StgWord32 modHashNo,
StgWord64 *tixArr)
{
HpcModuleInfo *tmpModule;
@@ -313,7 +313,7 @@ hs_hpc_module(char *modName,
static void
writeTix(FILE *f) {
- HpcModuleInfo *tmpModule;
+ HpcModuleInfo *tmpModule;
unsigned int i, inner_comma, outer_comma;
outer_comma = 0;
@@ -331,32 +331,32 @@ writeTix(FILE *f) {
outer_comma = 1;
}
fprintf(f," TixModule \"%s\" %u %u [",
- tmpModule->modName,
- (nat)tmpModule->hashNo,
- (nat)tmpModule->tickCount);
+ tmpModule->modName,
+ (nat)tmpModule->hashNo,
+ (nat)tmpModule->tickCount);
debugTrace(DEBUG_hpc,"%s: %u (hash=%u)\n",
- tmpModule->modName,
- (nat)tmpModule->tickCount,
+ tmpModule->modName,
+ (nat)tmpModule->tickCount,
(nat)tmpModule->hashNo);
inner_comma = 0;
for(i = 0;i < tmpModule->tickCount;i++) {
if (inner_comma) {
- fprintf(f,",");
+ fprintf(f,",");
} else {
- inner_comma = 1;
+ inner_comma = 1;
}
if (tmpModule->tixArr) {
- fprintf(f,"%" FMT_Word64,tmpModule->tixArr[i]);
+ fprintf(f,"%" FMT_Word64,tmpModule->tixArr[i]);
} else {
- fprintf(f,"0");
+ fprintf(f,"0");
}
}
fprintf(f,"]");
}
fprintf(f,"]\n");
-
+
fclose(f);
}