cmake: Check for libproc library name

libprocps can be replaced with libprocps-ng, so check for the proper library name.
This fix building with ArchLinux.

Reviewed-by: Arthur Huillet <arthur.huillet@free.fr>
Signed-off-by: José Fonseca <jfonseca@vmware.com>
common: Add more comments.
Add a high-level overview of apitrace source tree.
Add per-directory synopsis.
gltrace: Handle negative lengths in glShaderSource* (issue #116).
cli: Fix script search for out of source build.

Only for debug builds.  Release must be installed.
gui: Handle calls stranded between frames gracefully (issue #117).

Still a bit hackish (those calls will disappear), but at least the gui
doesn't crash now.
Improve Android tracing instructions

Tracing of Java applications on Android is quite different from tracing native
executables, so move it to a separate file.

Add instructions on using wrapping support that appeared in Android 4.0, which
simplifies usage of apitrace on Android.

Add a reference to adjust-child-env tool that allows to inject tracing library
on Android without rebuilding and reflashing recovery image.

Signed-off-by: José Fonseca <jose.r.fonseca@gmail.com>
Rename Android.markdown to Dalvik.markdown.

As README still contains Android information.

Minor tweaks.
cmake: Update android.toolchain.cmake from upstream (issue #115).

From https://github.com/taka-no-me/android-cmake/commit/62bcf2b40e8b8a943dd4923dfcf614e661af0678
qapitrace: Support executing glretrace on a remote target host.

This is supported with a new command-line argument:

	qapitrace --remote-target <HOST> <trace-file>

See README.markdown for documentation on usage and current limitations
of this feature.
gui: Fix includes.

stdio.h doesn't seem necessary. stdlib.h might be though, for exit().
Cleanup README formatting.
glretrace: Flush outstanding requests when waiting for user input.

This helps make "apitrace replay -sb" work in cases where the driver
really only exposes double-buffered rendering, (so a flush is required
to make anything appear if the trace doesn't include a final
SwapBuffers).
replay: Add a --loop option to repeatedly loop over the final frame

This can be useful for repeatedly exercising the driver with the
operations of a single frame.
gltrace,glretrace: Properly handle PBOs with GL_EXT_direct_state_access.

- glCompressed*Tex*ImageEXT receive intptr instead of blobs when PBO is used

- glGet*Tex*ImageEXT have side effects when PBO is used
trim --prune: Look at FLAG_NO_SIDE_EFFECTS rather than FLAG_VERBOSE

The --prune option is documented precisely to prune calls with no side
effects, so that's the flag it should examine.

Previously, the trim --prune code was keying off of the VERBOSE
flag. This hasn't made a substantial difference in the past, (the
NO_SIDE_EFFECTS calls have historically all been VERBOSE as well). But
NO_SIDE_EFFECTS has the advantage that it can objectively determined,
so the set of calls that should have this flag should be
unambiguous. (Meanwhile, whether any particular call should be
classified as VERBOSE is inherently subjective.)
trim: Don't consider a SwapBuffers call has having no side effects

I can't justify why I ever added this code. I can only guess that I was
trying to get qapitrace to not show frame markers for frames that had
largely been trimmed.

Anyway, the code is wrong. SwapBuffers call obviously have significant
side effects. And the effect I was trying to achieve is already well
satisified by the change in 2f0d1a3244c8953a4468759ac466b80c4965d38f
that will trim a SwapBuffers call when --trim-spec=drawing is in
force.
trim: Greatly expand the list of calls considered to have no side effects

The list of calls added here with the NO_SIDE_EFFECTS flag was
obtained from the existing specs/glapi.py file, (most[*] calls with
"sideeffects=False").

It's a bit unfortunate that we have this duplication of information in
the source tree, (two different lists of calls with no side
effects). But that duplication was already present before this
commit. This commit merely brings this list into sync with the other.

[*] The following calls are not added here in spite of having
sideeffects=False in glapi.py:

    glGetTextureImageEXT
    glGetnCompressedTexImageARB
    glGetnColorTableARB

José reports that the above calls can have side effects when PBOs are
on, (and he plans to update glapi.py).

Then, while the following calls may not affect traditional "GL state"
they do have side effects that can be observed by the user. And these
are debugging side effects that can be very important when
replaying/analyzing a trace. For example, debug message or string
markers are used to decorate different portions of the graphics
command stream with user-supplied data that exists nowhere else. So
these calls are not considered as having no side effects:

    glDebugMessageControl
    glDebugMessageControlARB
    glDebugMessageEnableAMD
    glDebugMessageInsert
    glDebugMessageInsertAMD
    glDebugMessageInsertARB
    glPopDebugGroup
    glPushDebugGroup
    glStringMarkerGREMEDY
trim: Fix early-bailout bug when accepting both --calls and --frames

The trim code was inappropriately bailing once either list was
exhausted, before also exhausting the user's other requested list.

This fixes the traces/trim-frames-and-calls test recently added to the
apitrace-tests repository.

Thanks to Eric Anholt for reporting this bug.