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
>From 3e96f076d65d499a8d373128aaef9a562f5f6237 Mon Sep 17 00:00:00 2001
From: Nathan Kidd <nk...@opentext.com>
Date: Fri, 13 May 2011 11:33:54 -0400
Subject: [PATCH] Always prefix tracing lines with [VGL] tag
---
rr/faker.cpp | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/rr/faker.cpp b/rr/faker.cpp
index d29f8a1..05a7887 100644
--- a/rr/faker.cpp
+++ b/rr/faker.cpp
@@ -167,7 +167,7 @@ static int __vgltracelevel=0;
double __vgltracetime=0.; \
if(fconfig.trace) { \
if(__vgltracelevel>0) { \
- rrout.print("\n "); \
+ rrout.print("\n[VGL] "); \
for(int __i=0; __i<__vgltracelevel; __i++) rrout.print(" "); \
} \
else rrout.print("[VGL] "); \
@@ -186,7 +186,7 @@ static int __vgltracelevel=0;
rrout.PRINT(") %f ms\n", __vgltracetime*1000.); \
__vgltracelevel--; \
if(__vgltracelevel>0) { \
- rrout.print(" "); \
+ rrout.print("[VGL] "); \
if(__vgltracelevel>1) \
for(int __i=0; __i<__vgltracelevel-1; __i++) rrout.print(" "); \
} \
--
1.6.3.3
------------------------------------------------------------------------------
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