// This assumes that there is no real thread 0.
StgThreadID tid = (current_tso == 0) ? 0 : current_tso->id;
if (tid != previous_tid) {
- previous_tid = current_tso->id;
+ previous_tid = tid;
// How do we print StgWord32's without a cast?
- fprintf(rixFile,"Thread %d\n",(unsigned int)tid);
+ fprintf(rixFile,"Thread Switch %d\n",(unsigned int)tid);
}
}
* Called on *every* exception thrown
*/
void
-hs_hpc_throw(StgTSO *current_tso) {
+hs_hpc_event(char *msg,StgTSO *current_tso) {
// Assumes that we have had at least *one* tick first.
// All exceptions before the first tick are not reported.
// The only time this might be an issue is in bootstrapping code,
if (rixFile != NULL) {
assert(hpc_inited != 0);
send_ThreadId(current_tso);
- fprintf(rixFile,"Throw\n");
+ fprintf(rixFile,"%s\n",msg);
}
}
fclose(f);
if (rixFile != NULL) {
- fprintf(rixFile,"Finished\n",prog_name);
+ fprintf(rixFile,"Finished\n");
fclose(rixFile);
}