[PATCH] ldv/unwind: Improve stacktrace feature
luca.clementi at gmail.com
Thu Oct 31 06:51:16 UTC 2013
On Thu, Oct 10, 2013 at 6:54 AM, Masatake YAMATO <yamato at redhat.com> wrote:
> Based on the discussion on strace-devel, I improved following points:
> * using unwind_ as prefix for functions exported from unwind.c
> * stacktrace for execve
> About the most of system calls, stacktrace is captured and printed at
> the same time, the system call exiting. However, about execve, which
> is marked with STACKTRACE_CAPTURE_IN_ENTERING(CE), stacktrace is
> captured at the system call entering, and is printed at the exiting.
> By capturing in the system call entering, user can know the process
> context of execve is called.
> struct queue_t and some manipulators are introduced for
> capturing-at-entering and printing-at-exiting.
> * controlling the maps cache with STACKTRACE_MAKE_CACHE_INVALID(CI) marker
> Currently stacktrace feature of strace needs the information of the
> memory mapping. Some of system calls like mmap change the memory
> mapping of the target process. Therefore unwind.c must track the
> modification of memory mapping.
> In older version the modification is tracked in print functions of
> each system call. In this patch STACKTRACE_MAKE_CACHE_INVALID(CI)
> marker is introduced. In stead of handling in print functions, the
> modification is tracked in system call entering only if current
> system call is marked with CI.
> If new system call modifying the memory mapping is added, just
> mark it with CI.
> * marking CI on brk, mremap, shmat, shmdt, and remap_file_pages.
> * Move the memory mapping cache to libuwind and use API for it.
> See http://lists.nongnu.org/archive/html/libunwind-devel/2013-10/msg00001.html
> * Handle multi threads
> If target threads are share the same address space, cache invalidation
> on a thread must be propagated to the other threads.
> * Static link target
> Target compiled with gcc -static, stacktrace is not
> shown well through gdb can show it. Maybe libunwind
> side issue.
> * Platform other than linux/x86_64
> * Test cases
I think you email client messed up the patch.
I can't apply it is full of "=" at the end of lines.
I don't know what the maintainer prefers but shouldn't you push this
patch with all the required modification (for all the architectures)
and then ask to other plp to test them?
More information about the Strace-devel