Skip to content

GpaDisableCounter

Copyright (c) 2018-2024 Advanced Micro Devices, Inc. All rights reserved.

Syntax

GpaStatus GpaDisableCounter(
GpaSessionId session_id,
GpaUInt32 index);

Description

Disables the specified counter. Subsequent sampling sessions will not provide values for any disabled counters. Initially all counters are disabled, and must explicitly be enabled.

Parameters

NameDescription
session_idUnique identifier of a previously-created session.
indexThe index of the counter to disable. Must lie between 0 and (GpaGetNumCounters result - 1).

Return value

Return valueDescription
kGpaStatusOkThe counter was successfully disabled.
kGpaStatusErrorGpaNotInitializedGPA was not initialized. Call GpaInitialize before all other entrypoints.
kGpaStatusErrorNullPointerThe supplied session_id parameter is NULL.
kGpaStatusErrorSessionNotFoundThe supplied session_id parameter was not recognized as a previously-created session identifier.
kGpaStatusErrorCannotChangeCountersWhenSamplingThe set of enabled counters cannot be changed after GpaBeginSession is called.
kGpaStatusErrorIndexOutOfRangeThe specified index is out of range.
kGpaStatusErrorNotEnabledThe specified counter is not currently enabled.
kGpaStatusErrorFailedAn error occurred while trying to disable the counter.
kGpaStatusErrorExceptionException occurred.