From 9c249fefc3c582280462db73a21a63d682c6455d Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Wed, 3 Jul 2024 20:35:24 +0200 Subject: [PATCH] gpu: Improve periodic cache debug message I was watching the log in my terminal and nothing happened. And I wasn't sure if that was because nothing was printed or because the same thing was printed every few seconds. Fix that by printing a timestamp, so that in a few seconds something else will be printed. --- gsk/gpu/gskgpudevice.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gsk/gpu/gskgpudevice.c b/gsk/gpu/gskgpudevice.c index 7bac120977..cca2fd5be2 100644 --- a/gsk/gpu/gskgpudevice.c +++ b/gsk/gpu/gskgpudevice.c @@ -60,10 +60,12 @@ cache_gc_cb (gpointer data) { GskGpuDevice *self = data; GskGpuDevicePrivate *priv = gsk_gpu_device_get_instance_private (self); + gint64 timestamp; - GSK_DEBUG (GLYPH_CACHE, "Periodic GC"); + timestamp = g_get_monotonic_time (); + GSK_DEBUG (GLYPH_CACHE, "Periodic GC (timestamp %lld)", (long long) timestamp); - if (gsk_gpu_device_gc (self, g_get_monotonic_time ())) + if (gsk_gpu_device_gc (self, timestamp)) { priv->cache_gc_source = 0; return G_SOURCE_REMOVE;