diff options
author | Simon Marlow <simonmar@microsoft.com> | 2007-06-13 10:29:28 +0000 |
---|---|---|
committer | Simon Marlow <simonmar@microsoft.com> | 2007-06-13 10:29:28 +0000 |
commit | 23e5985c3db852981d527d10d6a6271688049790 (patch) | |
tree | 7b87dd13cdbbebb56be5e530fe524bd5694a2d22 /rts/RetainerSet.c | |
parent | 62d948405f6b9a95fe4b31b7cffa387e5425d6db (diff) | |
download | haskell-23e5985c3db852981d527d10d6a6271688049790.tar.gz |
FIX #1418 (partially)
When the con_desc field of an info table was made into a relative
reference, this had the side effect of making the profiling fields
(closure_desc and closure_type) also relative, but only when compiling
via C, and the heap profiler was still treating them as absolute,
leading to crashes when profiling with -hd or -hy.
This patch fixes up the story to be consistent: these fields really
should be relative (otherwise we couldn't make shared versions of the
profiling libraries), so I've made them relative and fixed up the RTS
to know about this.
Diffstat (limited to 'rts/RetainerSet.c')
-rw-r--r-- | rts/RetainerSet.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/rts/RetainerSet.c b/rts/RetainerSet.c index bfa0bc8acf..e1db615020 100644 --- a/rts/RetainerSet.c +++ b/rts/RetainerSet.c @@ -239,7 +239,7 @@ traverseAllRetainerSet(void (*f)(RetainerSet *)) void printRetainer(FILE *f, retainer itbl) { - fprintf(f, "%s[%s]", itbl->prof.closure_desc, itbl->prof.closure_type); + fprintf(f, "%s[%s]", GET_PROF_DESC(itbl), itbl->prof.closure_type); } #elif defined(RETAINER_SCHEME_CCS) // Retainer scheme 2: retainer = cost centre stack @@ -283,7 +283,7 @@ printRetainerSetShort(FILE *f, RetainerSet *rs) for (j = 0; j < rs->num; j++) { if (j < rs->num - 1) { - strncpy(tmp + size, rs->element[j]->prof.closure_desc, MAX_RETAINER_SET_SPACE - size); + strncpy(tmp + size, GET_PROF_DESC(rs->element[j]), MAX_RETAINER_SET_SPACE - size); size = strlen(tmp); if (size == MAX_RETAINER_SET_SPACE) break; @@ -293,7 +293,7 @@ printRetainerSetShort(FILE *f, RetainerSet *rs) break; } else { - strncpy(tmp + size, rs->element[j]->prof.closure_desc, MAX_RETAINER_SET_SPACE - size); + strncpy(tmp + size, GET_PROF_DESC(rs->element[j]), MAX_RETAINER_SET_SPACE - size); // size = strlen(tmp); } } |