platform: graphics: Harvest can now collect GpuVis trace data

Adding tool GpuVisTool to Harvest, used to collect CPU/i915 trace data
and optionally launch gpuvis to display and analyze the data. GpuVisTool
is selected by spevcifying "-tool gpuvis" on Harvest cmd line.

GpuVisTool works by launching the trace profiler on a single trace on a
single target device. It adds frame-loop parameters to the apitrace
command line. The user is instructed ti hit the Enter key when apitrace
reaches that loop, at which point GpuVisTool collect the trace data and
sends it back to the workstation.

GpuVisTool is configured through the JSON config file, as follows:
"Harvest": {
    [... usual Harvest config ...]
},
"GpuVis": {
  // Path to working dir on chrome-OS device.
  "chromeosWorkingDir": "gpuperf",
  // Env var to use on chrome-OS device when gathering trace data.
  "chromeosEnvVar": [
    "USE_I915_PERF=1",
    "I915_PERF_METRIC=RenderBasic"
  ],
  // GpuVis dir on local machine. GpuVis binaries and scripts should
  // be available from this dir. Trace data will also be stored here.
  "localGpuVisDir": "/home/gwink/Gaming/gpuvis",
  // What frame within trace to loop on and how many time.
  "frameLoop": "1000-1005,300",
  // How to invoke gpuvis, relative to localGpuVisDir above. Set to
  // empty string if you do not want to run gpuvis on collected trace
  // data.
  "runGpuVis": "./gpuvis"
}

BUG=None
TEST=Build with emerge and make. Manually test Harvest with various
config options.

Change-Id: I40c65f43c40d03226a901e777b757cbced3a04a2
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/graphics/+/2357254
Tested-by: Georges Winkenbach <gwink@chromium.org>
Commit-Queue: Georges Winkenbach <gwink@chromium.org>
Reviewed-by: Ilja H. Friedel <ihf@chromium.org>
4 files changed
tree: 930e04720ee7277db9ef9f45e29d38bfb6692558
  1. src/
  2. .gitignore
  3. OWNERS
  4. PRESUBMIT.cfg
  5. PRESUBMIT.py
  6. pylintrc