]> granicus.if.org Git - strace/commitdiff
mmap_cache, unwind: lift up mmap_cache_delete invocation from unwind.c
authorMasatake YAMATO <yamato@redhat.com>
Fri, 16 Feb 2018 19:37:12 +0000 (04:37 +0900)
committerDmitry V. Levin <ldv@altlinux.org>
Mon, 26 Feb 2018 23:22:24 +0000 (23:22 +0000)
mmap_cache_delete function used to be called by destructor of unwind
related code.  Now that other parts can use mmap cache,
mmap_cache_delete is called separately from unwind_tcb_fin.

* unwind.c (unwind_tcb_fin): Move mmap_cache_delete invocation ...
* strace.c (droptcb): ... here.

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

index 10579f661fbeaca418d7d02ec1c5c036a8763c93..794e9a0d4925e14c75eca13a61f364291202676f 100644 (file)
--- a/strace.c
+++ b/strace.c
@@ -803,6 +803,8 @@ droptcb(struct tcb *tcp)
        }
 #endif
 
+       mmap_cache_delete(tcp, __func__);
+
        nprocs--;
        debug_msg("dropped tcb for pid %d, %d remain", tcp->pid, nprocs);
 
index ef98fc99e74e05958d8f3a5b63728cde4ade317c..3457ec846f53c520a79a1e7b1129d3ef4fa604b5 100644 (file)
--- a/unwind.c
+++ b/unwind.c
@@ -98,8 +98,6 @@ unwind_tcb_fin(struct tcb *tcp)
        free(tcp->queue);
        tcp->queue = NULL;
 
-       mmap_cache_delete(tcp, __func__);
-
        _UPT_destroy(tcp->libunwind_ui);
        tcp->libunwind_ui = NULL;
 }