diff options
Diffstat (limited to 'tools/perf/util/unwind-libunwind.c')
-rw-r--r-- | tools/perf/util/unwind-libunwind.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tools/perf/util/unwind-libunwind.c b/tools/perf/util/unwind-libunwind.c index e060386165c5..4d45c0dfe343 100644 --- a/tools/perf/util/unwind-libunwind.c +++ b/tools/perf/util/unwind-libunwind.c | |||
@@ -539,11 +539,23 @@ int unwind__prepare_access(struct thread *thread) | |||
539 | return -ENOMEM; | 539 | return -ENOMEM; |
540 | } | 540 | } |
541 | 541 | ||
542 | unw_set_caching_policy(addr_space, UNW_CACHE_GLOBAL); | ||
542 | thread__set_priv(thread, addr_space); | 543 | thread__set_priv(thread, addr_space); |
543 | 544 | ||
544 | return 0; | 545 | return 0; |
545 | } | 546 | } |
546 | 547 | ||
548 | void unwind__flush_access(struct thread *thread) | ||
549 | { | ||
550 | unw_addr_space_t addr_space; | ||
551 | |||
552 | if (callchain_param.record_mode != CALLCHAIN_DWARF) | ||
553 | return; | ||
554 | |||
555 | addr_space = thread__priv(thread); | ||
556 | unw_flush_cache(addr_space, 0, 0); | ||
557 | } | ||
558 | |||
547 | void unwind__finish_access(struct thread *thread) | 559 | void unwind__finish_access(struct thread *thread) |
548 | { | 560 | { |
549 | unw_addr_space_t addr_space; | 561 | unw_addr_space_t addr_space; |