From: Sean.McKnight on 14 Jan 2010 12:13 I have used the "--enable-symbols" configure switch in the past to compile and debug Tcl/Tk extensions with "gdb". I would also like to use "gprof" at some point. I have dug around on the newsgroup and Wiki but have not found a specific example of how to get this to work with an extension (I saw an example with just the "tclsh" interpreter itself but not an extension). Just wondering if someone has done this before and can provide an example. Thanks for any help, Sean
From: Alexandre Ferrieux on 14 Jan 2010 18:15 On Jan 14, 6:13 pm, "Sean.McKnight" <mcknigh...(a)gmail.com> wrote: > I have used the "--enable-symbols" configure switch in the past to > compile and debug Tcl/Tk extensions with > "gdb". > > I would also like to use "gprof" at some point. I have dug around on > the newsgroup and Wiki but have > not found a specific example of how to get this to work with an > extension (I saw an example with just > the "tclsh" interpreter itself but not an extension). > > Just wondering if someone has done this before and can provide an > example. Sorry for the obvious, uninformative answer, but since nobody reacted... One easy thing is to link your ext statically and call your init func manually somewhere in the Tcl init sequence (see other Tcl_CreateObjCommand's). This way you have one single monolithic executable for gprof to chew on. -Alex
From: Sean.McKnight on 19 Jan 2010 14:22 On Jan 14, 6:15 pm, Alexandre Ferrieux <alexandre.ferri...(a)gmail.com> wrote: > On Jan 14, 6:13 pm, "Sean.McKnight" <mcknigh...(a)gmail.com> wrote: > > > I have used the "--enable-symbols" configure switch in the past to > > compile and debug Tcl/Tk extensions with > > "gdb". > > > I would also like to use "gprof" at some point. I have dug around on > > the newsgroup and Wiki but have > > not found a specific example of how to get this to work with an > > extension (I saw an example with just > > the "tclsh" interpreter itself but not an extension). > > > Just wondering if someone has done this before and can provide an > > example. > > Sorry for the obvious, uninformative answer, but since nobody > reacted... > > One easy thing is to link your ext statically and call your init func > manually somewhere in the Tcl init sequence (see other > Tcl_CreateObjCommand's). This way you have one single monolithic > executable for gprof to chew on. > > -Alex Thanks for your reply...I suspected that "gprof" and the like would not be able to handle the "load"ing of shared libraries during runtime. from what little testing i have done it seems like that is the case... I will try the static link idea...thanks again... sean
From: Alexandre Ferrieux on 20 Jan 2010 02:32 On Jan 19, 8:22 pm, "Sean.McKnight" <mcknigh...(a)gmail.com> wrote: > On Jan 14, 6:15 pm, Alexandre Ferrieux <alexandre.ferri...(a)gmail.com> > wrote: > > > > > > > On Jan 14, 6:13 pm, "Sean.McKnight" <mcknigh...(a)gmail.com> wrote: > > > > I have used the "--enable-symbols" configure switch in the past to > > > compile and debug Tcl/Tk extensions with > > > "gdb". > > > > I would also like to use "gprof" at some point. I have dug around on > > > the newsgroup and Wiki but have > > > not found a specific example of how to get this to work with an > > > extension (I saw an example with just > > > the "tclsh" interpreter itself but not an extension). > > > > Just wondering if someone has done this before and can provide an > > > example. > > > Sorry for the obvious, uninformative answer, but since nobody > > reacted... > > > One easy thing is to link your ext statically and call your init func > > manually somewhere in the Tcl init sequence (see other > > Tcl_CreateObjCommand's). This way you have one single monolithic > > executable for gprof to chew on. > > > -Alex > > Thanks for your reply...I suspected that "gprof" and the like would > not > be able to handle the "load"ing of shared libraries during runtime. > from > what little testing i have done it seems like that is the case... > > I will try the static link idea...thanks again... > > sean Note that I'm not saying it is impossible, just no firsthand experience ;-) -Alex
|
Pages: 1 Prev: Why does shimmering occur, when ... Next: installing package on Vista |