---
name: "PAPI_disable_component_by_name"
section: "3"
platform: "linux"
package: "libpapi-dev"
version: "7.1.0-5+b1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/PAPI_disable_component_by_name"
---

# PAPI\_disable\_component\_by\_name(3)

disables the named component

## NAME

PAPI\_disable\_component\_by\_name - disables the named component

## SYNOPSIS

## Detailed Description

**Return values**

*ENOCMP* component does not exist \
 *ENOINIT* unable to disable the component, the library has already been initialized

**Parameters**

*component\_name* name of the component to disable.

**Example:**

```
int result;
result = PAPI_disable_component_by_name("example");
if (result==PAPI_OK)
    printf("component \"example\" has been disabled\n");
//...
PAPI_library_init(PAPI_VER_CURRENT);
```

 **PAPI\_disable\_component\_by\_name()** allows the user to disable a component before **PAPI\_library\_init()** time. This is useful if the user knows they do not with to use events from that component and want to reduce the PAPI library overhead.

**PAPI\_disable\_component\_by\_name()** must be called before **PAPI\_library\_init()**.

**See also**

**PAPI\_library\_init**

**PAPI\_disable\_component**

## Author

Generated automatically by Doxygen for PAPI from the source code.
