diff options
-rw-r--r-- | rts/Linker.c | 6 | ||||
-rw-r--r-- | rts/Profiling.c | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/rts/Linker.c b/rts/Linker.c index 211b65150f..136f3f3a7d 100644 --- a/rts/Linker.c +++ b/rts/Linker.c @@ -2070,6 +2070,12 @@ static void * loadNativeObj_ELF (pathchar *path, char **errmsg) loaded_objects = nc; retval = nc->dlopen_handle; + +#if defined(PROFILING) + // collect any new cost centres that were defined in the loaded object. + refreshProfilingCCSs(); +#endif + goto success; dl_iterate_phdr_fail: diff --git a/rts/Profiling.c b/rts/Profiling.c index 04f00da157..c84296cd5d 100644 --- a/rts/Profiling.c +++ b/rts/Profiling.c @@ -54,7 +54,7 @@ FILE *prof_file; // List of all cost centres. Used for reporting. CostCentre *CC_LIST = NULL; // All cost centre stacks temporarily appear here, to be able to make CCS_MAIN a -// parent of all cost centres stacks (done in initProfiling2()). +// parent of all cost centres stacks (done in refreshProfilingCCSs()). static CostCentreStack *CCS_LIST = NULL; #if defined(THREADED_RTS) |