Merge tag 'renesas-cleanup-for-v3.19' of git://git.kernel.org/pub/scm/linux/kernel...
[cascardo/linux.git] / tools / perf / util / unwind-libunwind.c
index e060386..4d45c0d 100644 (file)
@@ -539,11 +539,23 @@ int unwind__prepare_access(struct thread *thread)
                return -ENOMEM;
        }
 
+       unw_set_caching_policy(addr_space, UNW_CACHE_GLOBAL);
        thread__set_priv(thread, addr_space);
 
        return 0;
 }
 
+void unwind__flush_access(struct thread *thread)
+{
+       unw_addr_space_t addr_space;
+
+       if (callchain_param.record_mode != CALLCHAIN_DWARF)
+               return;
+
+       addr_space = thread__priv(thread);
+       unw_flush_cache(addr_space, 0, 0);
+}
+
 void unwind__finish_access(struct thread *thread)
 {
        unw_addr_space_t addr_space;