Record and dump trace events in the perf tests

Trace data can be used to build additional metrics which measure
validation costs, GPU time, etc. It will also be helpful to store in
the test output for later analysis.

This CL also adds jsoncpp as a DEP so we can dump trace file json
output.

Bug: dawn:208
Change-Id: Ia6c05ca90aecae308ee6a4fd11e5f43bb03b1dc9
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/12080
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
diff --git a/src/tests/DawnTest.cpp b/src/tests/DawnTest.cpp
index bd87c2e..12a9b84 100644
--- a/src/tests/DawnTest.cpp
+++ b/src/tests/DawnTest.cpp
@@ -129,10 +129,11 @@
             continue;
         }
 
-        if (strstr(argv[i], "--adapter-vendor-id") != nullptr) {
-            const char* value = strchr(argv[i], '=');
-            if (value != nullptr) {
-                mVendorIdFilter = strtoul(value + 1, nullptr, 16);
+        constexpr const char kVendorIdFilterArg[] = "--adapter-vendor-id=";
+        if (strstr(argv[i], kVendorIdFilterArg) == argv[i]) {
+            const char* vendorIdFilter = argv[i] + strlen(kVendorIdFilterArg);
+            if (vendorIdFilter[0] != '\0') {
+                mVendorIdFilter = strtoul(vendorIdFilter, nullptr, 16);
                 // Set filter flag if vendor id is non-zero.
                 mHasVendorIdFilter = mVendorIdFilter != 0;
             }