TestingAndDebugging

Testing And Debugging

How do you put a breakpoint in the dynamically loaded modules?

You need xfree86-gdb -- a version of gdb modified to understand the module binary format that XFree86 uses in addition to the standard elf/coff binary formats.

Type:

after starting the debugger to load symbols, etc.

How do I do benchmarking with Unreal Tournament?

Start a practice level. Type timedemo 1 in the console or in alternative select the Tools > TimeDemo Statistic menu entry.

You should see two numbers in white text on the right side of the screen showing the average framerate (Avg) and the number of frame rates in the last second (Last Sec). If this doesn't work check whether the stats get reported in your ~/.loki/ut/System/UnrealTournament.log file.

Is there any way for us to detect which features are implemented with hardware support for a given driver?

OpenGL doesn't have such a query. This is a potential problem with any OpenGL implementation. The real question one wants answered is "is this feature or GL state combination fast enough for my needs?". Whether a feature is implemented in hardware or software isn't always consistent with that question.

You might consider implementing a benchmark function to test the speed during start-up and making a decision depending on the result. The info could be cached in a file keyed by GL_RENDERER.

Check isfast

Which OpenGL benchmarking program can I use to test and compare various facets of the performance of graphics cards?

What environment variables affect libGL behavior?

LIBGL_DEBUG

If defined debug information will be printed to stderr. If set to verbose additional information will be printed.

LIBGL_DRIVERS_PATH

Path were to search for 3D DRI drivers.

LIBGL_MULTIHEAD

Define to specify the presence of more than one display.

LIBGL_ALWAYS_INDIRECT

Assures that no direct rendering will take place. See also here.

LIBGL_DRI_AUTOFULLSCREEN

If set to enable, 1, on, true, t, yes or y the driver it will check for the potential to enter an automatic full-screen mode.

LIBGL_SOFTWARE_RENDERING

If set it will force software rendering.

LIBGL_NO_MULTITEXTURE

If set it will disable the GL_ARB_multitexture extension.

LIBGL_PERFORMANCE_BOXES

If set the r128 driver, when built with ENABLE_PERF_BOXES will draw performance boxes.

LIBGL_THROTTLE_REFRESH

Throttle the framerate to the refresh rate on radeon, r200, and possibly other drivers.

How should I report bugs?

Please submit bugs to BugZilla. It's best if you can create a small example that shows what you think is the problem.

For those who really want to be Open Source heroes -- you can create a test for the bug under glean. The intention would be to run glean quite often, so any functionality you can verify there, is much less likely to reappear in a broken form at some random time in the future.

Capturing debugging info without networking

Here is a sort of simple shell script that I just thought of that might make people's lives a little easier. Cut & paste this into a file (maybe /usr/local/bin/dri_debug.sh) and then add this line to your equivalent of /etc/rc.local:

to have it run at boot time to save info from the last crash. Otherwise, just run it any old time to get a snapshot of log data.

If there's interest, I'll put together a nice rc script that should work on most distros for distribution with the testing binaries. This is just a "mock up" (I haven't even run it - I hate dog food ;) of what should be a bit more complicated and grab a few more things, but you get the idea.

It might be nice to patch xinitrc to do this:

every time so it can be bundled up, too.

Then when people start having problems, the list can expect (somewhat) consistent reports. Lemme know what you think.

I take no responsibility for the meltdown of your system ;)

How to get a backtrace on the core dump?

  1. If core dumps aren't turned on in your shell, turn them on.

    For tcsh it's a command like limit coredumpsize 200000 For bash it is ulimit -c unlimited. See the man page. Start the server startx from the same shell.

  2. When the server crashes and you get a core file, run gdb on it. The core file might be in /etc/X11 if it's not in the current directory.

    • gdb -c core /usr/X11R6/bin/XFree86
  3. From the gdb prompt type bt to get a backtrace. Hopefully you have symbols and it will give us an idea where it actually segfaulted.

    -- MarkVojkovich

http://dri.sourceforge.net/cgi-bin/moin.cgi/RecentChanges