You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Add unit test for OpenCounterContext
The unit tests should have a check that
GpaCounterLibOpenCounterContext() can be called with that various
possibilities for GpaOpenContextBits. There were gaps and bugs with
the GPUs I was adding but that didn't reveal itself until a client
tried asking for the hw counters when creating a counter context.
This could and should have been caught by the GPA unit test.
Also, I obsoleted two GpaOpenContextBits enum values, as they are
pointless with the latest GPA. kGpaOpenContextHideSoftwareCountersBit
was made pointless when support for SW counters was removed in GPA 3.0.
Similarly, it appears at one point GPA dished out the HW counters
by default and excluded them only on demand. Now they are excluded
by default, and shown only on demand. That made
kGpaOpenContextHideHardwareCountersBit pointless. Both those
enums have been renamed to have an _obsolete suffix. This aproach
maintains backwards runtime compatibility, but building against
the latest GPA will make clients cleanup (remove) any use of those
now pointless flags. This is beneficial to them and allows us to
improve the GPA interface and implementation.
Change-Id: Ie8cfeb66b787a2705a80beca574b98eee279872c
Copy file name to clipboardExpand all lines: include/gpu_performance_api/gpu_perf_api_types.h
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -193,8 +193,8 @@ typedef enum
193
193
0, ///< Open contexts using all default options (all counters exposed, clocks are set to stable frequencies which are known to be power and thermal sustainable. The ratio between the engine and memory clock frequencies will be kept the same as much as possible).
194
194
kGpaOpenContextHideDerivedCountersBit=0x01, ///< Prevent the derived counters from being exposed.
195
195
kGpaOpenContextHidePublicCountersBit=kGpaOpenContextHideDerivedCountersBit, ///< For backwards compatibility.
196
-
kGpaOpenContextHideSoftwareCountersBit=0x02, ///< Prevent the software counters from being exposed.
197
-
kGpaOpenContextHideHardwareCountersBit=0x04, ///< Prevent the hardware counters from being exposed.
196
+
kGpaOpenContextHideSoftwareCountersBit_obsolete=0x02, ///< Prevent the software counters from being exposed. OBSOLETE: sw counters not supported as of GPA 3.0
197
+
kGpaOpenContextHideHardwareCountersBit_obsolete=0x04, ///< Prevent the hardware counters from being exposed. OBSOLETE: hw counters hidden by default. kGpaOpenContextEnableHardwareCountersBit enables them
198
198
kGpaOpenContextClockModeNoneBit=0x0008, ///< Clock frequencies are not altered and may vary widely during profiling based on GPU usage and other factors.
199
199
kGpaOpenContextClockModePeakBit=
200
200
0x0010, ///< Clocks are set to peak frequencies. In most cases this is safe to do for short periods of time while profiling. However, the GPU clock frequencies could still be reduced from peak level under power and thermal constraints.
0 commit comments