-
Notifications
You must be signed in to change notification settings - Fork 33
Description
There are a few problems with region profiling in ReML:
-
Profiling does not work with parallelism and it is not possible to disable parallelism in ReML (
-no_paris not a possibility!), which makes theremlexecutable incompatible with region profiling. A work around is to usemlkit -reml -prof -no_gcinstead, but it is not very attractive.To make profiling work with parallelism, we could let each thread do their own profiling work (for their own region stack) and let each thread fill out an entry in a global "thread array" when done. Then when all threads are done the global flag "time-to-profile" is set to false (by the last thread). Some mutexes are (of couse) necessary. A question is whether we can avoid stalling of profiling, which requires that all threads progress.
-
Explicit regions and explicit effects are printed only with their internal stamp (an int) in profile plots. To support better printing of explicit regions in profile graphs, we can allow a special section in the rp-file mapping region stamps to strings (for displaying). For such a table to enter the rp-file, we need for this information to be present as data in each object file. Each object file should have a map and the link file should create a zero-terminated vector of the maps (in data-space). This vector can then be processed at runtime by the profiler when writing the rp-file.