The code i sent u and poor man's profiler r similar. But i had tried with
poor man's profile ... Same results ... no change

libunwind is not working if the code uses frame pointer for someother
purpose .......

Usage: ./get_stacktrace <pid>
[root@localhost knielsen-pmp]# ./get_stacktrace 4229

Thread: 4229
ip = 7a0424 <>+0
ip = 8048a77 <>+0
ip = 126cc6 <>+0
ip = 8048771 <>+0
*
Thread: 4230
ip = 7a0424 <>+0
*
Thread: 4231
ip = 7a0424 <>+0
ip = 80488ab <>+0
ip = 7c7919 <>+0
ip = 1ecd4e <>+0

Thread: 4232
ip = 7a0424 <>+0
ip = 80488ab <>+0
ip = 7c7919 <>+0
ip = 1ecd4e <>+0
[root@localhost knielsen-pmp]# pstack 4229
Thread 4 (Thread 0xb7846b70 (LWP 4230)):
#0  0x007a0424 in __kernel_vsyscall ()
#1  0x007cb22c in pthread_cond_wait@@GLIBC_2.3.2 () from
/lib/libpthread.so.0
#2  0x08048923 in watch_count ()
#3  0x007c7919 in start_thread () from /lib/libpthread.so.0
#4  0x001ecd4e in clone () from /lib/libc.so.6
Thread 3 (Thread 0xb6e45b70 (LWP 4231)):
#0  0x007a0424 in __kernel_vsyscall ()
#1  0x001acea6 in nanosleep () from /lib/libc.so.6
#2  0x001accd0 in sleep () from /lib/libc.so.6
#3  0x080488ab in inc_count ()
#4  0x007c7919 in start_thread () from /lib/libpthread.so.0
#5  0x001ecd4e in clone () from /lib/libc.so.6
Thread 2 (Thread 0xb6444b70 (LWP 4232)):
#0  0x007a0424 in __kernel_vsyscall ()
#1  0x001acea6 in nanosleep () from /lib/libc.so.6
#2  0x001accd0 in sleep () from /lib/libc.so.6
#3  0x080488ab in inc_count ()
#4  0x007c7919 in start_thread () from /lib/libpthread.so.0
#5  0x001ecd4e in clone () from /lib/libc.so.6
Thread 1 (Thread 0xb78476c0 (LWP 4229)):
#0  0x007a0424 in __kernel_vsyscall ()
#1  0x007c7fdd in pthread_join () from /lib/libpthread.so.0
#2  0x08048a77 in main ()
[root@localhost knielsen-pmp]#


On Wed, Feb 22, 2012 at 10:56 AM, Arun Sharma <[email protected]> wrote:

> On Tue, Feb 21, 2012 at 9:28 AM, Sasikanth <[email protected]>
> wrote:
> > Hi,
> >
> >    I spent lot of time on debugging the code. am not sure about the
> > libunwind internals .. but libunwind failed on to extract frame
> information
> > from pthreads lib api (example pthread_cond_wait in this function the
> frame
> > pointer is getting changed to some value like 0x1). Libunwind works with
> the
> > examples provided by u .......
>
> Before I try to reproduce your problem, have  you tested the poor
> man's profiler written using libunwind?
>
> https://github.com/knielsen/knielsen-pmp
> http://poormansprofiler.org/
>
> May be it already does what you need?
>
>  -Arun
>
_______________________________________________
Libunwind-devel mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/libunwind-devel

Reply via email to