summaryrefslogtreecommitdiff
path: root/rts/Hpc.c
diff options
context:
space:
mode:
authorandy@galois.com <unknown>2006-10-25 20:12:29 +0000
committerandy@galois.com <unknown>2006-10-25 20:12:29 +0000
commit0df7dbb1b98d08521f177ade22615861752f8981 (patch)
treeedda9f7c33ab269365fa39ef75eb3b1f8edde7bd /rts/Hpc.c
parentb8ec5dac41a84a7de12b10d5c5a7c9bf3efb83b9 (diff)
downloadhaskell-0df7dbb1b98d08521f177ade22615861752f8981.tar.gz
Changing Main.tix to <prog_name>.tix in the Hpc RTS
Diffstat (limited to 'rts/Hpc.c')
-rw-r--r--rts/Hpc.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/rts/Hpc.c b/rts/Hpc.c
index 8e67ffcc88..b1b2608294 100644
--- a/rts/Hpc.c
+++ b/rts/Hpc.c
@@ -10,6 +10,7 @@
#include <string.h>
#include <assert.h>
#include "HsFFI.h"
+#include "Rts.h"
#include "Hpc.h"
/* This is the runtime support for the Haskell Program Coverage (hpc) toolkit,
@@ -38,7 +39,7 @@ int totalTixes = 0; // total number of tix boxes.
-static char *tixFilename = "Main.tix";
+static char *tixFilename;
static void failure(char *msg) {
printf("Hpc failure: %s\n",msg);
@@ -104,6 +105,10 @@ static void hpc_init(void) {
}
hpc_inited = 1;
+
+ tixFilename = (char *) malloc(strlen(prog_name) + 6);
+ sprintf(tixFilename, "%s.tix", prog_name);
+
if (init_open(tixFilename)) {
totalTixes = 0;