Skip to content

Improvements to defining profiling modes #599

Closed

Description

@hiker

ATM, an application script (or site-specific config file) needs to define the profiles for all compilers, and preprocessors, e.g. typically something like:

        for compiler in (tr[Category.C_COMPILER] +
                         tr[Category.C_PREPROCESSOR] +
                         tr[Category.FORTRAN_COMPILER] +
                         tr[Category.FORTRAN_PREPROCESSOR] +
                         tr[Category.LINKER]):
            compiler.define_profile("base", inherit_from="")
            for profile in self.get_valid_profiles():
                compiler.define_profile(profile, inherit_from="base")

In hindsight, the ability to define profiling modes per tool seems not to be useful. If a new tools is added that needs profiling flags (like the recent change to the preprocessor, #596), application scripts need to be updated.

I suggest to replace this with using static functions in ProfileFlags. This would simplify the above code to something like:

            ProfileFlags.define_profile("base", inherit_from="")
            for profile in self.get_valid_profiles():
                ProfileFlags.define_profile(profile, inherit_from="base")

and that especially makes it easier if new tools are added that need profile-specific modes.

Activity

  1. added 6 commits that reference this issue on Aug 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions