Skip to content

GpaIsCounterEnabled

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

Syntax

GpaStatus GpaIsCounterEnabled(
GpaSessionId session_id,
GpaUInt32 counter_index);

Description

Checks whether or not a counter is enabled.

Parameters

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

Return value

Return valueDescription
kGpaStatusOkThe specified counter is enabled.
kGpaStatusErrorGpaNotInitializedGPA was not initialized. Call GpaInitialize before all other entrypoints.
kGpaStatusErrorCounterNotFoundThe specified counter is not enabled.
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.
kGpaStatusErrorContextNotOpenThe supplied session’s parent context is not currently open.
kGpaStatusErrorIndexOutOfRangeThe specified index is out of range.
kGpaStatusErrorFailedAn error occurred while trying to retrieve the enabled status of the specified counter.
kGpaStatusErrorExceptionException occurred.