[mutter] screen-cast/src: Add debug logging when creating buffers
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] screen-cast/src: Add debug logging when creating buffers
- Date: Mon, 7 Feb 2022 14:11:58 +0000 (UTC)
commit 38f3bf6ee289e4732029111d672c5d73bcf57a41
Author: Jonas Dreßler <verdre v0yd nl>
Date: Tue Jan 25 14:59:40 2022 +0100
screen-cast/src: Add debug logging when creating buffers
Add some debug logging that allows checking whether we're using DMA
buffers for screencasting or system memory buffers. This can be useful
for debugging screencasting performance and CPU usage.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2256>
src/backends/meta-screen-cast-stream-src.c | 8 ++++++++
1 file changed, 8 insertions(+)
---
diff --git a/src/backends/meta-screen-cast-stream-src.c b/src/backends/meta-screen-cast-stream-src.c
index 2efe7bc238..96fd35457e 100644
--- a/src/backends/meta-screen-cast-stream-src.c
+++ b/src/backends/meta-screen-cast-stream-src.c
@@ -859,6 +859,10 @@ on_stream_add_buffer (void *data,
if (dmabuf_handle)
{
+ meta_topic (META_DEBUG_SCREEN_CAST,
+ "Allocating DMA buffer for pw_stream %u",
+ pw_stream_get_node_id (priv->pipewire_stream));
+
spa_data[0].type = SPA_DATA_DmaBuf;
spa_data[0].flags = SPA_DATA_FLAG_READWRITE;
spa_data[0].fd = cogl_dma_buf_handle_get_fd (dmabuf_handle);
@@ -878,6 +882,10 @@ on_stream_add_buffer (void *data,
return;
}
+ meta_topic (META_DEBUG_SCREEN_CAST,
+ "Allocating MemFd buffer for pw_stream %u",
+ pw_stream_get_node_id (priv->pipewire_stream));
+
/* Fallback to a memfd buffer */
spa_data[0].type = SPA_DATA_MemFd;
spa_data[0].flags = SPA_DATA_FLAG_READWRITE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]