Imre Deak [Fri, 30 Mar 2012 12:45:38 +0000 (15:45 +0300)]
Android: hard code the trace file path to be under /data
On Android for Dalvik applications cwd is preset to that of the zygote
(app_process) process and it's the root directory. Since root is r/o
mounted by default it's more convenient to have the trace file in /data
which is writeable at least by root by default.
Signed-off-by: Imre Deak <imre.deak@intel.com> Signed-off-by: José Fonseca <jose.r.fonseca@gmail.com>
At least the Android software GL implementation doesn't return the
proper value for this, but rather returns 0. The GL(ES) specification
mandates a minimum value of 2, so use this as a fall-back value.
Signed-off-by: Imre Deak <imre.deak@intel.com> Signed-off-by: José Fonseca <jose.r.fonseca@gmail.com>
Dan McCabe [Wed, 21 Mar 2012 16:53:45 +0000 (09:53 -0700)]
Add trim support to qapitrace GUI app.
This patch adds support for trimming of traces via the qapitrace GUI.
We enhance the GUI by adding a Trim entry to the Trace menu. When the
user selects either a frame or a call, the "apitrace trim" command
will be invoked to trim all calls after the selected call or frame.
New trace files are created automatically and named according to the
last call number in the trimmed trace.
For example, if the original trace file is:
/path/foo.trace
and the trace is trimmed after call 1234, the name of the trimmed trace
file will be named:
/path/foo.1234.trim.trace
Upon trimming, the trimmed trace file will be loaded into qapitrace.
First, we enhance the Trace menu of the GUI app.
Next, we add a TrimProcess class. This is modelled on the TraceProcess
class, but takes into account differences and simplifications.
Next, we tie the TrimProcess class into the main window by accessing
that class and its members appropriately as well as tieing in message
communication with that class.
Finally, we add a reference to the source of TrimProcess to the make
system.
Signed-off-by: José Fonseca <jose.r.fonseca@gmail.com>
Carl Worth [Mon, 9 Apr 2012 20:45:33 +0000 (13:45 -0700)]
apitrace diff-images: Print one line for each file being compared.
This is important so that the test suite can verify that "apitrace
diff-images" is actually doing something. The tricky case is when no
images are found to compare. In this case, diff-images exits with
value 0, (no differences), which is valid, but the test suite wants to
know that no comparison happened since that's unexpected, (and should
flag a failure in the test suite).
Signed-off-by: José Fonseca <jose.r.fonseca@gmail.com>
Carl Worth [Mon, 9 Apr 2012 20:45:33 +0000 (13:45 -0700)]
apitrace diff-images: Print one line for each file being compared.
This is important so that the test suite can verify that "apitrace
diff-images" is actually doing something. The tricky case is when no
images are found to compare. In this case, diff-images exits with
value 0, (no differences), which is valid, but the test suite wants to
know that no comparison happened since that's unexpected, (and should
flag a failure in the test suite).
Carl Worth [Mon, 9 Apr 2012 18:24:52 +0000 (11:24 -0700)]
Don't show images where there is no difference.
This makes for a much more compact view for the common case where
image mismatches are rare, and makes the mismatches stand out more
making them easier to notice.
To avoid hiding information irretrievably, the filename is made into a
link to the image so that it can be easily seen if desired.
Signed-off-by: José Fonseca <jose.r.fonseca@gmail.com>
Carl Worth [Tue, 3 Apr 2012 22:58:50 +0000 (15:58 -0700)]
os_posix: Fix return value for os::execute()
Previously, this was returning the status value from waitpid directly.
That is incorrect as the actual exit status from the executed program
is likely to be in high-order bits of that status value. Instead, use
the WEXITSTATUS macro to return the actual exit status value.
Signed-off-by: José Fonseca <jose.r.fonseca@gmail.com>
Carl Worth [Wed, 28 Mar 2012 01:13:14 +0000 (18:13 -0700)]
cli: Add a simple implementation of "apitrace dump-images"
This merely calls out to the existing glretrace command with
appropriate options for generating snapshots. This at least provides
the image-dumping capability within the unified command-line
interface.
In the future, it will likely make sens to make dump-images do things
in-process.
The -o option takes an argument (the filename), so the getopt string
needs to be 'o:', not 'o'. Otherwise, no argument is parsed, optarg
remains NULL, and we crash on "output = optarg".