intel/ds: avoid dropping traces when running out of shared memory
authorLionel Landwerlin <lionel.g.landwerlin@intel.com>
Wed, 30 Aug 2023 08:43:44 +0000 (11:43 +0300)
committerMarge Bot <emma+marge@anholt.net>
Mon, 25 Sep 2023 13:05:45 +0000 (13:05 +0000)
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24744>

src/intel/ds/intel_driver_ds.cc

index 25f63b9..a27b9ae 100644 (file)
@@ -107,6 +107,10 @@ struct IntelRenderpassTraits : public perfetto::DefaultDataSourceTraits {
 
 class IntelRenderpassDataSource : public MesaRenderpassDataSource<IntelRenderpassDataSource,
                                                                   IntelRenderpassTraits> {
+public:
+   /* Make sure we're not losing traces due to lack of shared memory space */
+   constexpr static perfetto::BufferExhaustedPolicy kBufferExhaustedPolicy =
+      perfetto::BufferExhaustedPolicy::kDrop;
 };
 
 PERFETTO_DECLARE_DATA_SOURCE_STATIC_MEMBERS(IntelRenderpassDataSource);