* Tracepoints and Timestamps [not found] <CAEEVgBVFNRLqG67VwzF1D63Ro57Sww1HOwyrPBywRPBnHt5Hjg@mail.gmail.com> @ 2011-11-04 19:06 ` Abhishek Karoliya 2011-11-07 6:41 ` Hui Zhu 0 siblings, 1 reply; 5+ messages in thread From: Abhishek Karoliya @ 2011-11-04 19:06 UTC (permalink / raw) To: gdb Hi, I am remote debuging a multi threaded app on a powerpc e500v2 dual processor running linux 2.6.32 while the host gdb is x86_64 linux machine. The version of gdb is 7.3.1. On hitting a tracepoint, I want to collect the timestamp. I am wondering is there is any way of doing it currently on this gdb. If not, I was wondering if I can collect the timebase registers (tbl and tbu). The current register dump does not show the contents of these register on e500v2 although I have seen an entry for other powerpc processor. Is there a way I can quickly add support for these registers. If someone can point me to file/doc/previous patches to do this I will be grateful. Cheers! Abhi ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Tracepoints and Timestamps 2011-11-04 19:06 ` Tracepoints and Timestamps Abhishek Karoliya @ 2011-11-07 6:41 ` Hui Zhu 2011-11-07 14:53 ` Abhishek Karoliya 0 siblings, 1 reply; 5+ messages in thread From: Hui Zhu @ 2011-11-07 6:41 UTC (permalink / raw) To: Abhishek Karoliya; +Cc: gdb If you use the gdbserver that include in GDB source, you can access special tvariable $trace_timestamp. If not, I think maybe you can add a special tvariable that access to timebase registers (tbl and tbu) to gdbserver. Then you can collect it when you want it. Thanks, Hui On Sat, Nov 5, 2011 at 03:05, Abhishek Karoliya <abhikaro@gmail.com> wrote: > Hi, > > I am remote debuging a multi threaded app on a powerpc e500v2 dual > processor running linux 2.6.32 while the host gdb is x86_64 linux > machine. The version of gdb is 7.3.1. On hitting a tracepoint, I want > to collect the timestamp. I am wondering is there is any way of doing > it currently on this gdb. If not, I was wondering if I can collect the > timebase registers (tbl and tbu). The current register dump does not > show the contents of these register on e500v2 although I have seen an > entry for other powerpc processor. > > Is there a way I can quickly add support for these registers. If > someone can point me to file/doc/previous patches to do this I will be > grateful. > > Cheers! > Abhi > ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Tracepoints and Timestamps 2011-11-07 6:41 ` Hui Zhu @ 2011-11-07 14:53 ` Abhishek Karoliya 2011-11-07 16:15 ` Stan Shebs 0 siblings, 1 reply; 5+ messages in thread From: Abhishek Karoliya @ 2011-11-07 14:53 UTC (permalink / raw) To: Hui Zhu; +Cc: gdb Hi Hui, Thanks for the pointer ... However after going through the gdbserver source code, I realise that there is no tracepoint support for linux-ppc. So now I have a even bigger problem on my hand. Does anyone know if I can ppc tracepoint support being actively developed and if I can lay my hands on this experimental code. Cheers! Abhi On Mon, Nov 7, 2011 at 6:40 AM, Hui Zhu <teawater@gmail.com> wrote: > If you use the gdbserver that include in GDB source, you can access > special tvariable $trace_timestamp. > > If not, I think maybe you can add a special tvariable that access to > timebase registers (tbl and tbu) to gdbserver. Then you can collect > it when you want it. > > Thanks, > Hui > > > On Sat, Nov 5, 2011 at 03:05, Abhishek Karoliya <abhikaro@gmail.com> wrote: >> Hi, >> >> I am remote debuging a multi threaded app on a powerpc e500v2 dual >> processor running linux 2.6.32 while the host gdb is x86_64 linux >> machine. The version of gdb is 7.3.1. On hitting a tracepoint, I want >> to collect the timestamp. I am wondering is there is any way of doing >> it currently on this gdb. If not, I was wondering if I can collect the >> timebase registers (tbl and tbu). The current register dump does not >> show the contents of these register on e500v2 although I have seen an >> entry for other powerpc processor. >> >> Is there a way I can quickly add support for these registers. If >> someone can point me to file/doc/previous patches to do this I will be >> grateful. >> >> Cheers! >> Abhi >> > ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Tracepoints and Timestamps 2011-11-07 14:53 ` Abhishek Karoliya @ 2011-11-07 16:15 ` Stan Shebs 2011-11-07 17:20 ` Pedro Alves 0 siblings, 1 reply; 5+ messages in thread From: Stan Shebs @ 2011-11-07 16:15 UTC (permalink / raw) To: gdb On 11/7/11 6:53 AM, Abhishek Karoliya wrote: > Hi Hui, > > Thanks for the pointer ... However after going through the > gdbserver source code, I realise that there is no tracepoint support > for linux-ppc. So now I have a even bigger problem on my hand. > > Does anyone know if I can ppc tracepoint support being actively > developed and if I can lay my hands on this experimental code. > The tracepoint support in GDBserver is pretty generic, and if you don't need fast tracepoints, there's not really anything that is arch-specific. I would suggest enabling target_supports_tracepoints for ppc and letting us know how it goes. If it "just works", then we could change the target_supports_tracepoints test to make it unconditional - fast tracepoint support has its own availability check at runtime, it could subsume the architecture check. Stan stan@codesourcery.com ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Tracepoints and Timestamps 2011-11-07 16:15 ` Stan Shebs @ 2011-11-07 17:20 ` Pedro Alves 0 siblings, 0 replies; 5+ messages in thread From: Pedro Alves @ 2011-11-07 17:20 UTC (permalink / raw) To: gdb; +Cc: Stan Shebs On Monday 07 November 2011 16:15:17, Stan Shebs wrote: > On 11/7/11 6:53 AM, Abhishek Karoliya wrote: > > Hi Hui, > > > > Thanks for the pointer ... However after going through the > > gdbserver source code, I realise that there is no tracepoint support > > for linux-ppc. So now I have a even bigger problem on my hand. > > > > Does anyone know if I can ppc tracepoint support being actively > > developed and if I can lay my hands on this experimental code. > > > > The tracepoint support in GDBserver is pretty generic, and if you don't > need fast tracepoints, there's not really anything that is arch-specific. > > I would suggest enabling target_supports_tracepoints for ppc and letting > us know how it goes. If it "just works", then we could change the > target_supports_tracepoints test to make it unconditional. We can't. The backend needs to be able to step over breakpoints so it can step over tracepoints without gdb involvement. Which means, it either needs to support hardware single-step (ppc does), or, it'll need to know how to software single-step. No gdbserver port can do the latter. And it should ideally switch to using gdbserver side breakpoints (z0/Z0 packets, the insert_point/remove_point hooks), so breakpoints and tracepoints can coexist. linux-ppc-low.c should install the supports_tracepoints hook like linux-x86-low.c does: static int x86_supports_tracepoints (void) { return 1; } and insert_point/remote_point hooks, like x86_insert_point/x86_remove_point. The Z0 insert/remove code support would ideally be moved to the gdbserver core side, controlled by a new "use software breakpoints" hook added to gdbserver's target vector, so that bit of code could be reused. -- Pedro Alves ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-11-07 17:20 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <CAEEVgBVFNRLqG67VwzF1D63Ro57Sww1HOwyrPBywRPBnHt5Hjg@mail.gmail.com> 2011-11-04 19:06 ` Tracepoints and Timestamps Abhishek Karoliya 2011-11-07 6:41 ` Hui Zhu 2011-11-07 14:53 ` Abhishek Karoliya 2011-11-07 16:15 ` Stan Shebs 2011-11-07 17:20 ` Pedro Alves
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).