Skip to content

rocp_sdk: provide a way to disable component in rocprofiler_configure #416

@TannerFirl

Description

@TannerFirl

Because rocprofiler-sdk searches for symbols named rocprofiler_configure and invokes them during runtime initialization, a lot of the rocp_sdk PAPI code is invoked before a call to PAPI_disable_component_by_name can be called. It'd be nice if there were some PAPI environment variable users could set in order to short-circuit PAPI's rocp_sdk rocprofiler_configure code. Something at the top of rocprofiler_configure like the following:

    const char* env_val = getenv("PAPI_ROCP_SDK_DISABLE");
    if (env_val != NULL && 
        (strcmp(env_val, "1") == 0 || strcasecmp(env_val, "yes") == 0)) {
        // PAPI rocp_sdk component is disabled
        return NULL;
    }

This would prevent further logic from being executed that may cause unintentional side-effects (I have personally seen some benign logs to stdout due to PAPI's rocp_sdk component invoking some rocprofiler-sdk functions).

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions