Support for "apitrace trim --auto --trim-spec"
Carl Worth
cworth at cworth.org
Mon Jan 28 04:51:31 PST 2013
I've written support for doing specifying what kinds of automatic
dependency-based trimming should be performed.
This is documented as follows:
--trim-spec=SPEC Specifies which classes of calls will be trimmed.
This option only has an effect if dependency
analysis is enabled. The argument is a comma-
separated list of names from the following:
no-side-effects Calls with no side effects
textures Calls to setup unused textures
shaders Calls to setup unused shaders
drawing Calls that draw
The default trim specification includes all of
the above, (as much as possible will be trimmed).
This can be quite useful for using "apitrace trim --auto" even before
all the bugs are fixed. Users can avoid bugs in particular classes by
restricting the trim-spec to avoid buggy parts. This also allows
developers to know where to look to fix bugs in "apitrace trim --auto".
I've pushed two patches to my master branch to implement this new
option (see commit messages below).
Next, I'll augment the test suite to test these options.
After that, I'll get my existing optimizations for "apitrace trim"
cleaned up and rebased and submitted.
Then it's time for new bug fixes and new optimizations. Stay tuned.
-Carl
commit 0c606be08fdeb985e2889e92c466fe4443740b0f
Author: Carl Worth <cworth at cworth.org>
Date: Fri Nov 16 12:41:52 2012 -0800
trim: Trim swapbuffers calls when --trim-spec=drawing
Previously, the SwapBuffers calls were only getting trimmed if
--trim-spec included "no-side-effects". It was counter-intuitive that
a trim-spec of "drawing" alone would leave all the SwapBuffers calls
in place. So catch them under this trim-spec as well.
commit 1410cfd59b49af9e756ac5b7cce7885a1df38413
Author: Carl Worth <cworth at cworth.org>
Date: Wed Nov 14 20:55:31 2012 -0800
trim: Add a new --trim-spec option for fine-grained trimming
This has two benefits:
1. In cases where the dependency analysis goes wrong, using the --trim-spec
option can help identify which portion of the code is misbehaving, (and
allows the user to still get some trim benefit by avoiding the broken
code).
2. The implementation of this change breaks the analysis code up into several
more fine-grained functions, so it should be easier to review and maintain.
--
carl.d.worth at intel.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/apitrace/attachments/20130128/5f0ffe25/attachment.pgp>
More information about the apitrace
mailing list