# First, trim the trace to the final glxSwapBuffers call
-apitrace trim --calls=27 tri.trace
+apitrace trim --auto --calls=27 tri.trace
# Then dump the image and compare to our reference
# Trim to the same callset used to generate reference images
-apitrace trim --calls=10,47,50,71,87,88 glxsimple.trace
+apitrace trim --auto --calls=10,47,50,71,87,88 glxsimple.trace
# Verify that we actually trimmed what we wanted to
# Trim to the same callset used to generate reference images
-apitrace trim --calls=10,31,50,71,87,88 glxsimple.trace
+apitrace trim --auto --calls=10,31,50,71,87,88 glxsimple.trace
# Verify that we actually trimmed what we wanted to
-trim --frames=0-5/draw,0-5/frame --exact glxsimple.trace
+trim --frames=0-5/draw,0-5/frame glxsimple.trace
dump --verbose glxsimple-trim.trace
0 glClear(mask = GL_COLOR_BUFFER_BIT)
1 glXSwapBuffers(dpy = 0x236a280, drawable = 41943041)
-trim --frames=0 glxsimple.trace
-dump --verbose glxsimple-trim.trace
+trim -o trim-head-by-frame.src.trace --auto --frames=0 glxsimple.trace
+dump --verbose trim-head-by-frame.src.trace
0 glXChooseVisual(dpy = 0x236a280, screen = 0, attribList = {GLX_RGBA, GLX_RED_SIZE, GLX_RED_SIZE, GLX_GREEN_SIZE, GLX_RED_SIZE, GLX_BLUE_SIZE, GLX_RED_SIZE, GLX_ALPHA_SIZE, GLX_RED_SIZE, GLX_DOUBLEBUFFER, GLX_DEPTH_SIZE, 24, GLX_STENCIL_SIZE, GLX_RED_SIZE, GLX_X_VISUAL_TYPE, GLX_DIRECT_COLOR, 0}) = &{visual = 0x2374ef8, visualid = 34, screen = 0, depth = 24, c_class = 5, red_mask = 16711680, green_mask = 65280, blue_mask = 255, colormap_size = 256, bits_per_rgb = 8}
1 glXCreateContext(dpy = 0x236a280, vis = &{visual = 0x2374ef8, visualid = 34, screen = 0, depth = 24, c_class = 5, red_mask = 16711680, green_mask = 65280, blue_mask = 255, colormap_size = 256, bits_per_rgb = 8}, shareList = NULL, direct = True) = 0x2384330
2 glXMakeCurrent(dpy = 0x236a280, drawable = 41943041, ctx = 0x2384330) = True
-trim --calls=0-843 glxsimple.trace
-dump --verbose glxsimple-trim.trace
+trim -o trim-head.src.trace --auto --calls=0-843 glxsimple.trace
+dump --verbose trim-head.src.trace
0 glXChooseVisual(dpy = 0x236a280, screen = 0, attribList = {GLX_RGBA, GLX_RED_SIZE, GLX_RED_SIZE, GLX_GREEN_SIZE, GLX_RED_SIZE, GLX_BLUE_SIZE, GLX_RED_SIZE, GLX_ALPHA_SIZE, GLX_RED_SIZE, GLX_DOUBLEBUFFER, GLX_DEPTH_SIZE, 24, GLX_STENCIL_SIZE, GLX_RED_SIZE, GLX_X_VISUAL_TYPE, GLX_DIRECT_COLOR, 0}) = &{visual = 0x2374ef8, visualid = 34, screen = 0, depth = 24, c_class = 5, red_mask = 16711680, green_mask = 65280, blue_mask = 255, colormap_size = 256, bits_per_rgb = 8}
1 glXCreateContext(dpy = 0x236a280, vis = &{visual = 0x2374ef8, visualid = 34, screen = 0, depth = 24, c_class = 5, red_mask = 16711680, green_mask = 65280, blue_mask = 255, colormap_size = 256, bits_per_rgb = 8}, shareList = NULL, direct = True) = 0x2384330
2 glXMakeCurrent(dpy = 0x236a280, drawable = 41943041, ctx = 0x2384330) = True
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
-'''Stress test driver for apitrace trimp.'''
+'''Stress test driver for apitrace trim.'''
import os, errno, shutil, subprocess
for frame in range(frames):
try:
- subprocess.check_call([self.options.apitrace, "trim", "--frame=%d" % (frame), "--output=" + trim_file, trace_file])
+ subprocess.check_call([self.options.apitrace, "trim", "--auto", "--frame=%d" % (frame), "--output=" + trim_file, trace_file])
except:
print "An error occurred while trimming frame %d from %s" % (frame, trace_file)
fail()