[sysprof] preload: setup per-thread caching



commit 63f781eef95c8a10a94d4ed2f9039a3e3743f838
Author: Christian Hergert <chergert redhat com>
Date:   Sun Feb 16 21:02:21 2020 -0700

    preload: setup per-thread caching
    
    We also need to invalidate caches at some point on dlopen()/dlclose().

 src/libsysprof/preload/sysprof-memory-collector.c | 3 +++
 1 file changed, 3 insertions(+)
---
diff --git a/src/libsysprof/preload/sysprof-memory-collector.c 
b/src/libsysprof/preload/sysprof-memory-collector.c
index 1b7785c..232c9dd 100644
--- a/src/libsysprof/preload/sysprof-memory-collector.c
+++ b/src/libsysprof/preload/sysprof-memory-collector.c
@@ -62,6 +62,9 @@ G_DEFINE_CONSTRUCTOR(collector_init_ctor)
 static void
 collector_init_ctor (void)
 {
+#if ENABLE_LIBUNWIND
+  unw_set_caching_policy (unw_local_addr_space, UNW_CACHE_PER_THREAD);
+#endif
   sysprof_collector_init ();
   collector_ready = TRUE;
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]