]> granicus.if.org Git - strace/commit
unwind: lift up unw_flush_cache from mmap cache management code
authorMasatake YAMATO <yamato@redhat.com>
Fri, 16 Feb 2018 19:37:08 +0000 (04:37 +0900)
committerDmitry V. Levin <ldv@altlinux.org>
Mon, 26 Feb 2018 23:22:24 +0000 (23:22 +0000)
commita40806919f7ee01c57fb8c5505046f03cd9fec44
tree3ce9a0ebd1188187c27389b736d396acac3bfa25
parent73166c3fd1247eaa5412d54ba06fc25ccca2b2c5
unwind: lift up unw_flush_cache from mmap cache management code

For making mmap cache code reusable from other areas in strace
than unwind, mmap cache related code and unwind related code
should be separated.

This change is one of the steps for the separation.  It moves
unw_flush_cache function call from the core of mmap cache code
to upper level code.

* unwind.c (mmap_cache_rebuild_result): New enum.
(rebuild_cache_if_invalid): Return MMAP_CACHE_REBUILD_* instead of
a bool value.
(build_mmap_cache): Don't call unw_flush_cache here.
(unwind_print_stacktrace, unwind_capture_stacktrace): Call
unw_flush_cache here instead.

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
unwind.c