Skip to content

ReML Region Profiling #210

@melsman

Description

@melsman

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_par is not a possibility!), which makes the reml executable incompatible with region profiling. A work around is to use mlkit -reml -prof -no_gc instead, 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.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions