- /path/to/qapitrace application.trace
-
-Special notes on "apitrace trace" for Linux
--------------------------------------------
-The "apitrace trace" command uses the `LD_PRELOAD` mechanism which
-should work with most applications. There are some applications,
-e.g., Unigine Heaven, which global function pointers with the same
-name as GL entrypoints, living in a shared object that wasn't linked
-with `-Bsymbolic` flag, so relocations to those globals function
-pointers get overwritten with the address to our wrapper library, and
-the application will segfault when trying to write to them.
-
-For these applications it is possible to trace by using `glxtrace.so`
-as an ordinary `libGL.so` and injecting into `LD_LIBRARY_PATH`:
-
- ln -s glxtrace.so libGL.so
- ln -s glxtrace.so libGL.so.1
- ln -s glxtrace.so libGL.so.1.2
- export LD_LIBRARY_PATH=/path/to/directory/where/glxtrace/is:$LD_LIBRARY_PATH
+ qapitrace application.trace
+
+You can also tell the GUI to go directly to a specific call
+
+ qapitrace application.trace 12345
+
+
+Advanced command line usage
+===========================
+
+
+Call sets
+---------
+
+Several tools take `CALLSET` arguments, e.g:
+
+ apitrace dump --calls=CALLSET foo.trace
+ apitrace dump-images --calls=CALLSET foo.trace
+
+The call syntax is very flexible. Here are a few examples:
+
+ * `4` one call
+
+ * `0,2,4,5` set of calls
+
+ * `"0 2 4 5"` set of calls (commas are optional and can be replaced with whitespace)
+
+ * `0-100/2` calls 1, 3, 5, ..., 99
+
+ * `0-1000/draw` all draw calls between 0 and 1000
+
+ * `0-1000/fbo` all fbo changes between calls 0 and 1000
+
+ * `frame` all calls at end of frames
+
+ * `@foo.txt` read call numbers from `foo.txt`, using the same syntax as above
+
+
+
+Tracing manually
+----------------
+
+### Linux ###
+
+On 64 bits systems, you'll need to determine whether the application is 64 bits
+or 32 bits. This can be done by doing
+
+ file /path/to/application
+
+But beware of wrapper shell scripts -- what matters is the architecture of the
+main process.
+
+Run the GLX application you want to trace as
+
+ LD_PRELOAD=/path/to/apitrace/wrappers/glxtrace.so /path/to/application
+
+and it will generate a trace named `application.trace` in the current
+directory. You can specify the written trace filename by setting the
+`TRACE_FILE` environment variable before running.
+
+For EGL applications you will need to use `egltrace.so` instead of
+`glxtrace.so`.
+
+The `LD_PRELOAD` mechanism should work with the majority applications. There
+are some applications (e.g., Unigine Heaven, Android GPU emulator, etc.), that
+have global function pointers with the same name as OpenGL entrypoints, living in a
+shared object that wasn't linked with `-Bsymbolic` flag, so relocations to
+those global function pointers get overwritten with the address to our wrapper
+library, and the application will segfault when trying to write to them. For
+these applications it is possible to trace by using `glxtrace.so` as an
+ordinary `libGL.so` and injecting it via `LD_LIBRARY_PATH`:
+
+ ln -s glxtrace.so wrappers/libGL.so
+ ln -s glxtrace.so wrappers/libGL.so.1
+ ln -s glxtrace.so wrappers/libGL.so.1.2
+ export LD_LIBRARY_PATH=/path/to/apitrace/wrappers:$LD_LIBRARY_PATH