[PATCH resend 5/8] mmap_cache, unwind: lift up mmap_cache_delete invocation from unwind.c
Masatake YAMATO
yamato at redhat.com
Fri Feb 16 19:37:12 UTC 2018
Destructor of unwind related code called mmap_cache_delete function.
However, now, other parts than unwind.c can use mmap cache.
So mmap_cache_delete, the cache destructor should be called separately
from unwind related code.
* strace.c (droptcb): Call mmap_cache_delete.
* unwind.c (unwind_tcb_fin): Don't call mmap_cache_delete.
Signed-off-by: Masatake YAMATO <yamato at redhat.com>
---
strace.c | 2 ++
unwind.c | 2 --
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/strace.c b/strace.c
index 10579f66..794e9a0d 100644
--- 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);
diff --git a/unwind.c b/unwind.c
index ef98fc99..3457ec84 100644
--- 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;
}
--
2.14.3
More information about the Strace-devel
mailing list