Except for the fact that you pushed over the nested lines by four too many spaces, this is fine. Checked into HEAD.
On 5/13/11 10:38 AM, Nathan Kidd wrote: > On 11-05-10 10:06 PM, DRC wrote: >> On 5/3/11 10:53 AM, Nathan Kidd wrote: >>> Yeah, the nested calls are annoying enough as it is. The attached >>> trivial patch fixes the issue for glXIsDirect(). There are a number of >>> other nested traces though. For readability probably a simple "static >>> int tracedepth" could be added to the starttrace/stoptrace macros to >>> give automatic indenting for the nested calls. Let me see how that >>> looks... >> >> I checked in a patch to CVS head which should line up the nested calls >> on new lines in the trace output. See how it works for you. > > Current CVS gives me: > >> [VGL] glXMakeCurrent (dpy=0x7f6cf813eb40(:0.0) drawable=0x0700145e >> ctx=0x7f6cf8c421c8 >> XQueryExtension (dpy=0x7f6cf813eb40(:0.0) name=XVideo >> *major_opcode=132 *first_event=72 *first_error=140 ) 0.051022 ms >> >> glXCreatePbuffer (dpy=0x7f6cf8131000(:0.0) >> config=0x00000105(0x105) attrib_list=[0x8041=0x0168 0x8040=0x0121 >> 0x801b=0x0001 ] pb=0x06e00008 ) 0.403166 ms >> config=0x00000105(0x105) drawable=0x06e00008 ) 38.542032 ms >> [VGL] glViewport (x=0 y=0 width=360 height=289 ) 0.010014 ms > > > With the attached patch we get: > >> [VGL] glXMakeCurrent (dpy=0x7fcc6c13cd90(:0.0) drawable=0x070011c9 >> ctx=0x7fcc6d5b42e8 >> [VGL] XQueryExtension (dpy=0x7fcc6c13cd90(:0.0) name=XVideo >> *major_opcode=132 *first_event=72 *first_error=140 ) 0.051022 ms >> [VGL] >> [VGL] glXCreatePbuffer (dpy=0x7fcc6c12f250(:0.0) >> config=0x00000105(0x105) attrib_list=[0x8041=0x0168 0x8040=0x0121 >> 0x801b=0x0001 ] pb=0x06e00008 ) >> [VGL] config=0x00000105(0x105) drawable=0x06e00008 ) 4.723072 ms >> [VGL] glViewport (x=0 y=0 width=360 height=289 ) 0.005960 ms > > The reason I like this better is because there's no possibility for > confusion of which lines came from VGL (think output from VGL and app > both going to stderr/stdout). > > The empty lines aren't so nice (coming from the 2nd modified line in the > patch). I don't see a way to fix it apart from a) being able to look up > the last char written to the stream (again think mixed output to stream) > or b) modifying all the prarg macros to print leading space if > necessary. The complexity doesn't seem worth it. > > -Nathan > > > > ------------------------------------------------------------------------------ > Achieve unprecedented app performance and reliability > What every C/C++ and Fortran developer should know. > Learn how Intel has extended the reach of its next-generation tools > to help boost performance applications - inlcuding clusters. > http://p.sf.net/sfu/intel-dev2devmay > > > > _______________________________________________ > VirtualGL-Devel mailing list > VirtualGL-Devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/virtualgl-devel ------------------------------------------------------------------------------ Achieve unprecedented app performance and reliability What every C/C++ and Fortran developer should know. Learn how Intel has extended the reach of its next-generation tools to help boost performance applications - inlcuding clusters. http://p.sf.net/sfu/intel-dev2devmay _______________________________________________ VirtualGL-Devel mailing list VirtualGL-Devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/virtualgl-devel