On Sep 29, 2014, at 11:00 AM, Arun Sharma <[email protected]> wrote:
> On Wed, Sep 24, 2014 at 7:50 PM, Vladimir Nikulichev <[email protected]> wrote: > >> More details from README: >> >> At first it examines process' memory layout reading /proc/pid/maps. When the >> process is frozen (PTRACE_ATTACH to the main thread + SIGSTOP to start >> freezing >> other threads) it copies all threads' general-purpose registers and contents >> of >> stack from %rsp to end of memory region [..] > > How does this compare to the approach taken by perf tool included in > the linux kernel sources? It does something similar, but doesn't use > ptrace or signals. > > I'm guessing one difference is that you sample all the threads in the > process at the same time, where as perf samples stacks of individual > threads at different times depending on when they generate an event. > > -Arun Similarity of perf and tbstack is that instead of unwinding while thread is not running (either executing a kernel code or stopped by other user process with ptrace), which is a heavy job, it copies whole stack content to analyze afterwards. Yes, tbstack and similar tools take a snapshot of all threads including sleeping ones at particular point in time. Vladimir _______________________________________________ Libunwind-devel mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/libunwind-devel
