* unwind.c (init_unwind_addr_space): Rename to unwind_init.
(init_libunwind_ui): Rename to unwind_tcb_init.
(free_libunwind_ui): Rename to unwind_tcb_fin.
(delete_mmap_cache): Rename to unwind_cache_invalidate.
(print_stacktrace): Rename to unwind_print_stacktrace.
* defs.h: Update prototypes.
* mem.c: All callers updated.
* process.c: Likewise.
* strace.c: Likewise.
* syscall.c: Likewise.
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
extern void tv_div(struct timeval *, const struct timeval *, int);
#ifdef USE_LIBUNWIND
-extern void init_unwind_addr_space(void);
-extern void init_libunwind_ui(struct tcb *tcp);
-extern void free_libunwind_ui(struct tcb *tcp);
-extern void delete_mmap_cache(struct tcb* tcp);
-extern void print_stacktrace(struct tcb* tcp);
+extern void unwind_init(void);
+extern void unwind_tcb_init(struct tcb *tcp);
+extern void unwind_tcb_fin(struct tcb *tcp);
+extern void unwind_cache_invalidate(struct tcb* tcp);
+extern void unwind_print_stacktrace(struct tcb* tcp);
#endif
/* Strace log generation machinery.
if (entering(tcp)) {
#ifdef USE_LIBUNWIND
if (stack_trace_enabled)
- delete_mmap_cache(tcp);
+ unwind_cache_invalidate(tcp);
#endif
/* addr */
#ifdef USE_LIBUNWIND
else {
if (stack_trace_enabled)
- delete_mmap_cache(tcp);
+ unwind_cache_invalidate(tcp);
}
#endif
return 0;
#ifdef USE_LIBUNWIND
else {
if (stack_trace_enabled)
- delete_mmap_cache(tcp);
+ unwind_cache_invalidate(tcp);
}
#endif
return 0;
#ifdef USE_LIBUNWIND
else {
if (stack_trace_enabled)
- delete_mmap_cache(tcp);
+ unwind_cache_invalidate(tcp);
}
#endif
#ifdef USE_LIBUNWIND
if (stack_trace_enabled)
- init_libunwind_ui(tcp);
+ unwind_tcb_init(tcp);
#endif
nprocs++;
#ifdef USE_LIBUNWIND
if (stack_trace_enabled) {
- free_libunwind_ui(tcp);
+ unwind_tcb_fin(tcp);
}
#endif
memset(tcp, 0, sizeof(*tcp));
#ifdef USE_LIBUNWIND
if (stack_trace_enabled)
- init_unwind_addr_space();
+ unwind_init();
#endif
if (!followfork)
#ifdef USE_LIBUNWIND
if (stack_trace_enabled)
- print_stacktrace(tcp);
+ unwind_print_stacktrace(tcp);
#endif
ret:
static unw_addr_space_t libunwind_as;
void
-init_unwind_addr_space(void)
+unwind_init(void)
{
libunwind_as = unw_create_addr_space(&_UPT_accessors, 0);
if (!libunwind_as)
}
void
-init_libunwind_ui(struct tcb *tcp)
+unwind_tcb_init(struct tcb *tcp)
{
tcp->libunwind_ui = _UPT_create(tcp->pid);
if (!tcp->libunwind_ui)
}
void
-free_libunwind_ui(struct tcb *tcp)
+unwind_tcb_fin(struct tcb *tcp)
{
- delete_mmap_cache(tcp);
+ unwind_cache_invalidate(tcp);
_UPT_destroy(tcp->libunwind_ui);
tcp->libunwind_ui = NULL;
}
/* deleting the cache */
void
-delete_mmap_cache(struct tcb* tcp)
+unwind_cache_invalidate(struct tcb* tcp)
{
unsigned int i;
for (i = 0; i < tcp->mmap_cache_size; i++) {
/* use libunwind to unwind the stack and print a backtrace */
void
-print_stacktrace(struct tcb* tcp)
+unwind_print_stacktrace(struct tcb* tcp)
{
unw_word_t ip;
unw_cursor_t cursor;