Skip to content

GpaBeginSession

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

Syntax

GpaStatus GpaBeginSession(
GpaSessionId session_id);

Description

Begins sampling with the currently enabled set of counters. A session must have been created using GpaCreateSession before it can be started. A session must be started before creating any samples. The set of enabled counters for a session cannot be changed after the session has started.

Parameters

NameDescription
session_idUnique identifier of a previously-created session.

Return value

Return valueDescription
kGpaStatusOkThe session was successfully started.
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.
kGpaStatusErrorContextNotOpenThe supplied context is not currently open.
kGpaStatusErrorSessionAlreadyStartedThe session has already been started.
kGpaStatusErrorNoCountersEnabledThere are no counters enabled
kGpaStatusErrorFailedThe session could be be started.
kGpaStatusErrorOtherSessionActiveAnother session is active.
kGpaStatusErrorExceptionException occurred.